2 Commits

Author SHA1 Message Date
fb2a287802 add nginx configuration option for single page apps
Some checks failed
continuous-integration/drone/pr Build is failing
2025-01-16 19:50:54 -05:00
c788b36f13 Update .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-08 10:09:12 -08:00
3 changed files with 9 additions and 2 deletions

View File

@ -33,7 +33,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -23,3 +23,6 @@ COMPOSE_FILE="compose.yml"
# temporary or permanent redirect? (uncomment one)
#REDIRECT_TYPE=redirect
#REDIRECT_TYPE=permanent
# Optionally handle all URL requests using a single file (commonly index.html)
#SINGLE_PAGE_SITE_HANDLER=/index.html

View File

@ -15,7 +15,11 @@ server {
rewrite ^{{ env "REDIRECT_FROM_PATH" }}(.*)$ {{ env "REDIRECT_TO_URL" }}$1 {{ env "REDIRECT_TYPE" }};
{{ end }}
try_files $uri $uri/ $uri.html =404;
{{ if env "SINGLE_PAGE_SITE_HANDLER" }}
try_files $uri $uri/ {{ env "SINGLE_PAGE_SITE_HANDLER" }} =404;
{{ else }}
try_files $uri $uri/ $uri.html =404;
{{ end }}
}
error_page 404 /404.html;