Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tuutti committed Oct 22, 2024
1 parent f015ff5 commit 7185c83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
9 changes: 0 additions & 9 deletions local/drupal/files/etc/nginx/http.d/custom.locations
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
location ~ ^/(?:.*)-assets/(.*)$ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080/$1$is_args$args;
}

location ~* \.(css|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg|mp4|svgz|ogg|ogv|pdf|pptx?|zip|tgz|gz|rar|bz2|doc|xls|exe|tar|mid|midi|wav|bmp|rtf|txt|map)$ {
add_header Access-Control-Allow-Origin "*";
try_files $uri @rewrite;
Expand Down
18 changes: 9 additions & 9 deletions local/drupal/files/etc/nginx/http.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ server {
root /app/public;
index index.php;

location ~ ^/(?:.*)-assets/(.*)$ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080/$1$is_args$args;
}

# Allow locations to be added without overriding the whole conf.
include http.d/custom.locations;

Expand Down Expand Up @@ -128,13 +137,4 @@ server {
empty_gif;
}

location ~ ^/(?:.*)-assets/(.*)$ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080/$1$is_args$args;
}

}

0 comments on commit 7185c83

Please sign in to comment.