node-red-node-swagger
node-red-node-swagger copied to clipboard
/http-api/swagger.json is not CORS enabled
I have swagger UI on other server and I try to link with my node-red swagger API but CORS headers are not found on /http-api/swagger.json
curl -I http://myhost:1880/http-api/swagger.json
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 921
ETag: W/"399-O+kHybLKLLCZ4lh4LITBaw"
Date: Wed, 20 Jan 2016 19:58:17 GMT
Connection: keep-alive
Placing the configuration:
httpNodeCors: {
origin: "*",
methods: "GET,PUT,POST,DELETE"
},
it still happens
Thanks for raising. The httpNodeCors
configuration only gets applies to the HTTP In nodes - other things don't get it 'for free'. Will need to add in the proper handling for it in this node.
It doesn't look like CORS support has been added yet. This would greatly be appreciated.
(Allowing external access to the swagger UI tab instead would be even better! Should I raise that asa feature request or is it unlikely to be implemented?)