Open
Description
Right now the nginx.conf provided by s2i by default includes a block:
location {
}
in the default_server
block. When serving an SPA at root this causes problems. There are a bunch of examples out there for how to serve single page apps from root
- https://gist.github.com/dimitardanailov/7a7c4e3be9e03d1b578a
- https://gkedge.gitbooks.io/react-router-in-the-real/content/nginx.html
- https://serverfault.com/questions/773705/make-nginx-serve-index-html-if-requested-url-is-not-found-without-using-error-pa
What I'd like to propose (and will submit a PR for) is to allow an environment flag for replacing the default location block with SPA block.
location / {
try_files $uri $uri/ /index.html
}
Or if we want to add the ability to inject a SPA block through a predefined named file.
Metadata
Metadata
Assignees
Labels
No labels