Added support for Allow Headers #492 #493
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #492
this is example from VCL file when CORS headers are enabled:
# Snippet edgemodule_cors_headers_deliver : 45 if (req.http.Origin && !resp.http.Access-Control-Allow-Origin && !resp.http.Access-Control-Allow-Methods && !resp.http.Access-Control-Allow-Headers) { if ( req.http.Origin ~ "^https?://google.hr" ) { set resp.http.Access-Control-Allow-Origin = req.http.origin; } set resp.http.Access-Control-Allow-Methods = "GET,HEAD,POST,OPTIONS"; set resp.http.Access-Control-Allow-Headers = "Content-Type,X-company"; set resp.http.Vary:Origin = ""; }
and configuration:
It is tested fetch from different domains and with different headers.