-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1590 from danskernesdigitalebibliotek/release-202…
…4.38.2 Release 2024.38.2
- Loading branch information
Showing
4 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
lagoon/conf/nginx/server_append_disable_varnish_static_files.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Disable Varnish cache for all static files. Nginx will serve them just as quick. | ||
# | ||
# This is based on support for Surrogate-control supported by the Lagoon | ||
# Varnish for Drupal image: | ||
# https://github.com/uselagoon/lagoon-images/blob/main/images/varnish-drupal/drupal.vcl#L356 | ||
# | ||
# Drupal generated and user uploaded files | ||
location ^~ /sites/default/files/ { | ||
add_header Surrogate-Control "no-store" always; | ||
try_files $uri @drupal-files; | ||
} | ||
# External libraries managed by Drupal Core may contain static files. | ||
location ^~ /core/assets/vendor/ { | ||
add_header Surrogate-control "no-store" always; | ||
} | ||
# External libraries may contain static files. | ||
location ^~ /libraries/ { | ||
add_header Surrogate-control "no-store" always; | ||
} | ||
# Static files from the theme which will not be bundled by Drupal e.g. | ||
# fonts and icons. | ||
location ^~ /themes/custom/novel/assets/dpl-design-system/ { | ||
add_header Surrogate-control "no-store" always; | ||
} | ||
|
||
# Duplicate of upstrean @drupal location provided by the Lagoon Nginx image for | ||
# for Drupal. | ||
# https://github.com/uselagoon/lagoon-images/blob/main/images/nginx-drupal/drupal.conf#L72 | ||
# | ||
# This is needed to add an additional response header to files generated by | ||
# Drupal at runtime. Once the file is generated then the existing location will | ||
# take precedence but if does not then try_files will issue an internal | ||
# redirect which requires the headers to be set again. | ||
location @drupal-files { | ||
include /etc/nginx/conf.d/drupal/location_drupal_prepend*.conf; | ||
|
||
include /etc/nginx/fastcgi.conf; | ||
fastcgi_param SCRIPT_NAME /index.php; | ||
fastcgi_param SCRIPT_FILENAME $realpath_root/index.php; | ||
fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; | ||
|
||
add_header Surrogate-control "no-store" always; | ||
|
||
include /etc/nginx/conf.d/drupal/location_drupal_append*.conf; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters