Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.53
0.1.54
12 changes: 12 additions & 0 deletions templates/infra/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;

root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ =404;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When serving a static welcome page in a containerized or template-based environment, it is often better to fall back to index.html for SPAs or simply serve the index rather than returning a 404 if the exact URI is missing. However, if this is strictly for a static landing page, changing =404 to /index.html can improve user experience for trailing slash mismatches.

Suggested change
try_files $uri $uri/ =404;
+ try_files $uri $uri/ /index.html;

}
}
3 changes: 3 additions & 0 deletions templates/infra/nginx/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ setup:
dest: html/index.html
overwrite: false
external: true
- src: default.conf
dest: conf.d/default.conf
overwrite: false
- dest: conf.d/rate_limits.conf
overwrite: false
empty: true
2 changes: 1 addition & 1 deletion templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

//go:embed */metadata.yml */docker-compose.yml
//go:embed infra/*/metadata.yml infra/*/docker-compose.yml
//go:embed infra/nginx/nginx.conf infra/nginx/nginx.lua.conf infra/nginx/lua/*
//go:embed infra/nginx/nginx.conf infra/nginx/nginx.lua.conf infra/nginx/default.conf infra/nginx/lua/*
//go:embed welcome/index.html
var FS embed.FS

Expand Down
Loading