cherry-pick(#34491): chore: remove unused headers
This commit is contained in:
parent
2c85ade384
commit
92916b8e91
|
|
@ -214,12 +214,6 @@ export class HttpServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private _onRequest(request: http.IncomingMessage, response: http.ServerResponse) {
|
private _onRequest(request: http.IncomingMessage, response: http.ServerResponse) {
|
||||||
response.setHeader('Access-Control-Allow-Origin', '*');
|
|
||||||
response.setHeader('Access-Control-Request-Method', '*');
|
|
||||||
response.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET');
|
|
||||||
if (request.headers.origin)
|
|
||||||
response.setHeader('Access-Control-Allow-Headers', request.headers.origin);
|
|
||||||
|
|
||||||
if (request.method === 'OPTIONS') {
|
if (request.method === 'OPTIONS') {
|
||||||
response.writeHead(200);
|
response.writeHead(200);
|
||||||
response.end();
|
response.end();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue