Closed EwanRoycroft closed 2 years ago
It seems it's misinterpreting the header and replacing dashes with spaces somewhere.
[2021-11-10T14:25:37.346Z] INFO: mirror-http-server/27 on f7023a922ac6:
request: {
"ip": "172.17.0.1",
"ips": [],
"method": "GET",
"url": "/",
"headers": {
"user-agent": "Wget/1.21.1",
"accept": "*/*",
"accept-encoding": "identity",
"host": "localhost:8000",
"connection": "Keep-Alive",
"x-mirror-access-control-allow-origin": "*"
},
"body": {}
}
[2021-11-10T14:25:37.347Z] FATAL: mirror-http-server/27 on f7023a922ac6: Header name must be a valid HTTP token ["Access-Control Allow Origin"] (err.code=ERR_INVALID_HTTP_TOKEN)
TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token ["Access-Control Allow Origin"]
at ServerResponse.setHeader (_http_outgoing.js:520:3)
at ServerResponse.header (/app/node_modules/express/lib/response.js:771:10)
at ServerResponse.header (/app/node_modules/express/lib/response.js:774:12)
at /app/server.js:67:28
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at next (/app/node_modules/express/lib/router/route.js:137:13)
at next (/app/node_modules/express/lib/router/route.js:131:14)
at next (/app/node_modules/express/lib/router/route.js:131:14)
at next (/app/node_modules/express/lib/router/route.js:131:14)
at next (/app/node_modules/express/lib/router/route.js:131:14)
I'm getting a 500 response when I try to mirror the
Access-Control-Allow-Origin
header.