krakenjs/hapi-openapi

[enhancement] better cors support

dcharbonnier opened this issue · 2 comments

Build CORS for a route based on the declaration (https://hapijs.com/api/18.3.1#-routeoptionscors):

headers: ["Accept", "Authorization", "Content-Type", "If-None-Match"],
exposedHeaders: ["x-count", "link"]

Possible CORS headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)

Access-Control-Allow-Credentials
Access-Control-Allow-Headers
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Access-Control-Expose-Headers
Access-Control-Max-Age
Access-Control-Request-Headers
Access-Control-Request-Method

This is fixed by #158 no?

#158 is at the server lever this is to implement it at the route level