Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Allow Headers #492 #493

Merged

Conversation

dpotkoc
Copy link
Contributor

@dpotkoc dpotkoc commented Nov 9, 2021

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:

Screenshot from 2021-11-09 11-53-21

It is tested fetch from different domains and with different headers.

@smaeda-ks smaeda-ks self-requested a review November 10, 2021 08:14
@smaeda-ks smaeda-ks merged commit 55fc524 into fastly:master Nov 10, 2021
MickaelDatadome pushed a commit to DataDome/fastly-magento2 that referenced this pull request Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a field for Allowed Headers.
2 participants