Skip to content

Commit

Permalink
Removed CORS on ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Eltik committed Jul 2, 2023
1 parent e80dbb1 commit 385579a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions dist/libraries/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ async function proxyTs(url, headers, req, res) {
if (forceHTTPS) {
const proxy = node_https_1.default.request(options, (r) => {
res.writeHead(r.statusCode ?? 200, r.headers);
["Access-Control-Allow-Origin", "Access-Control-Allow-Methods", "Access-Control-Allow-Headers", "Access-Control-Max-Age", "Access-Control-Allow-Credentials", "Access-Control-Expose-Headers", "Access-Control-Request-Method", "Access-Control-Request-Headers", "Origin", "Vary", "Referer", "Server", "x-cache", "via", "x-amz-cf-pop", "x-amz-cf-id"].map((header) => res.removeHeader(header));
r.pipe(res, {
end: true,
});
Expand All @@ -630,7 +629,6 @@ async function proxyTs(url, headers, req, res) {
else {
const proxy = node_http_1.default.request(options, (r) => {
res.writeHead(r.statusCode ?? 200, r.headers);
["Access-Control-Allow-Origin", "Access-Control-Allow-Methods", "Access-Control-Allow-Headers", "Access-Control-Max-Age", "Access-Control-Allow-Credentials", "Access-Control-Expose-Headers", "Access-Control-Request-Method", "Access-Control-Request-Headers", "Origin", "Vary", "Referer", "Server", "x-cache", "via", "x-amz-cf-pop", "x-amz-cf-id"].map((header) => res.removeHeader(header));
r.pipe(res, {
end: true,
});
Expand Down
Loading

0 comments on commit 385579a

Please sign in to comment.