Skip to content

Commit e08bb5c

Browse files
committed
Add CORS headers and update nginx config to include search.php in order to suport web200/magento-elasticsuite-autocomplete
1 parent 973d57a commit e08bb5c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

build/dist/ssl/nginx/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ http {
1919
proxy_send_timeout 300;
2020
proxy_read_timeout 300;
2121

22+
add_header Access-Control-Allow-Origin "*";
2223
types_hash_max_size 2048;
2324

2425
log_format docker '[$time_local] - $scheme://$host$uri '

build/dist/web/nginx/content/magento2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ location /static/ {
102102
# Uncomment the following line in production mode
103103
# expires max;
104104

105+
add_header Access-Control-Allow-Origin "*";
106+
105107
# Remove signature of the static files that is used to overcome the browser cache
106108
location ~ ^/static/version {
107109
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
@@ -174,7 +176,7 @@ location /media/import/ {
174176
rewrite /pub/health_check.php /health_check.php;
175177

176178
# PHP entry point for main application
177-
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ {
179+
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check|search)\.php$ {
178180
try_files .~srcfile @php;
179181
}
180182

0 commit comments

Comments
 (0)