-
Notifications
You must be signed in to change notification settings - Fork 366
Description
Is your feature request related to a problem? Please describe.
Currently skipper only supports setting the CORS origin on the response but CORS also requires a preflight request (OPTIONS request) in certain cases (non form-based requests). I want skipper to handle CORS preflight requests.
Describe the solution you would like
The solution should provide a skipper filter corsPreflight
similar to the corsOrigin
filter. The corsPreflight
filter should be configurable allowing users to set the response headers Access-Control-Allow-Origin
, Access-Control-Allow-Methods
and Access-Control-Allow-Headers
. If they are not set meaningful defaults are used, i.e. Access-Control-Allow-Origin = *
, Access-Control-Allow-Methods = GET, POST, PUT, DELETE, PATCH, OPTIONS
and Access-Control-Allow-Headers = *
.
The filter should only work on requests with method OPTIONS
. When executed the filter should set the response headers as configured and the status to 200
and return this response. It should not forward the request to the backend.
Would you like to work on it?
Yes, but no time.