Skip to content

Commit

Permalink
build: fix client side routing for SPA behind bunkerweb proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Mar 4, 2025
1 parent 6504658 commit 3367e12
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ x-proxy-env: &proxy-env # General
BUNKERWEB_INSTANCES: proxy:5000
LOG_LEVEL: notice
USE_BUNKERNET: no
DISABLE_DEFAULT_SERVER: "yes"
DISABLE_DEFAULT_SERVER: yes
API_WHITELIST_IP: 127.0.0.0/8 10.20.30.0/24
MULTISITE: yes
USE_REVERSE_PROXY: yes
Expand Down
3 changes: 3 additions & 0 deletions deploy/compose.development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ x-proxy-env: &proxy-env # General
# USE_LETS_ENCRYPT_STAGING: yes
# Reverse proxy configs
SERVER_NAME: dev.fmtm.hotosm.org mapper.dev.fmtm.hotosm.org api.dev.fmtm.hotosm.org s3.dev.fmtm.hotosm.org sync.dev.fmtm.hotosm.org odk.dev.fmtm.hotosm.org
# We need this to allow for client-side routing in the SPA (from index.html)
dev.fmtm.hotosm.org_ERRORS: 404=/index.html
mapper.dev.fmtm.hotosm.org_ERRORS: 404=/index.html
api.dev.fmtm.hotosm.org_REVERSE_PROXY_HOST: http://api:8000
api.dev.fmtm.hotosm.org_MAX_CLIENT_SIZE: 1G
s3.dev.fmtm.hotosm.org_REVERSE_PROXY_HOST: http://s3:9000
Expand Down
3 changes: 3 additions & 0 deletions deploy/compose.main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ x-proxy-env: &proxy-env # General
# USE_LETS_ENCRYPT_STAGING: yes
# Reverse proxy configs
SERVER_NAME: dev.fmtm.hotosm.org mapper.fmtm.hotosm.org api.fmtm.hotosm.org s3.fmtm.hotosm.org sync.fmtm.hotosm.org odk.fmtm.hotosm.org
# We need this to allow for client-side routing in the SPA (from index.html)
fmtm.hotosm.org_ERRORS: 404=/index.html
mapper.fmtm.hotosm.org_ERRORS: 404=/index.html
api.fmtm.hotosm.org_REVERSE_PROXY_HOST: http://api:8000
api.fmtm.hotosm.org_MAX_CLIENT_SIZE: 1G
s3.fmtm.hotosm.org_REVERSE_PROXY_HOST: http://s3:9000
Expand Down
3 changes: 3 additions & 0 deletions deploy/compose.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ x-proxy-env: &proxy-env # General
# USE_LETS_ENCRYPT_STAGING: yes
# Reverse proxy configs
SERVER_NAME: stage.fmtm.hotosm.org mapper.stage.fmtm.hotosm.org api.stage.fmtm.hotosm.org s3.stage.fmtm.hotosm.org sync.stage.fmtm.hotosm.org odk.stage.fmtm.hotosm.org
# We need this to allow for client-side routing in the SPA (from index.html)
stage.fmtm.hotosm.org_ERRORS: 404=/index.html
mapper.stage.fmtm.hotosm.org_ERRORS: 404=/index.html
api.stage.fmtm.hotosm.org_REVERSE_PROXY_HOST: http://api:8000
api.stage.fmtm.hotosm.org_MAX_CLIENT_SIZE: 1G
s3.stage.fmtm.hotosm.org_REVERSE_PROXY_HOST: http://s3:9000
Expand Down

0 comments on commit 3367e12

Please sign in to comment.