Skip to content

Commit

Permalink
Fixed locations block
Browse files Browse the repository at this point in the history
  • Loading branch information
tuutti committed Apr 23, 2024
1 parent ff7f366 commit 9f175de
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions openshift/drupal/files/etc/nginx/http.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ server {
root /var/www/html/public;
index index.php;

# Support for the helfi_proxy module
# https://github.com/City-of-Helsinki/drupal-module-helfi-proxy
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;
# Make sure nginx doesn't buffer files to a temporary file. The value must be larger
# than the largest asset file.
# At the moment, the largest assets are .woff fonts from GIN theme.
proxy_buffers 240 340k;
proxy_busy_buffers_size 340k;
proxy_buffer_size 340k;
proxy_pass http://127.0.0.1:8080/$1$is_args$args;
}

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

Expand Down Expand Up @@ -119,21 +136,4 @@ server {
expires 30d;
empty_gif;
}

# Support for the helfi_proxy module
# https://github.com/City-of-Helsinki/drupal-module-helfi-proxy
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;
# Make sure nginx doesn't buffer files to a temporary file. The value must be larger
# than the largest asset file.
# At the moment, the largest assets are .woff fonts from GIN theme.
proxy_buffers 240 340k;
proxy_busy_buffers_size 340k;
proxy_buffer_size 340k;
proxy_pass http://127.0.0.1:8080/$1$is_args$args;
}
}

0 comments on commit 9f175de

Please sign in to comment.