We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.4.2
magento/magento-cloud-docker-nginx:1.19-1.2.2
For the NGINX image I am able to define an environment variable:
ENV REST_API_ORIGINS localhost:3000|staging.cloud
and then in the vhost.conf we add required headers:
vhost.conf
# PHP entry point for main application location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ { set $cors_origin ""; if ($http_origin ~ '^https?://(!ORIGINS!)$') { set $cors_origin $http_origin; } if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' $cors_origin always; add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,X-Cache-Hash' always; ### Tell client that this pre-flight info is valid for 20 days add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0; return 204; } add_header 'Access-Control-Allow-Origin' $cors_origin always; ... }
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue,
Internal ticket https://jira.corp.magento.com/browse/MCLOUD-7990 was created for processing
Sorry, something went wrong.
No branches or pull requests
Preconditions
2.4.2
magento/magento-cloud-docker-nginx:1.19-1.2.2
Steps to reproduce
Expected result
For the NGINX image I am able to define an environment variable:
and then in the
vhost.conf
we add required headers:Actual result
The text was updated successfully, but these errors were encountered: