aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-01-16 15:12:55 +0200
committerJan Tuomi <jan@jantuomi.fi>2026-01-16 15:12:55 +0200
commit3dddde75c8ba02f8b5365c1499b503c2215a2073 (patch)
tree1c950d705afe27e7856e6b3c2638c208d2524db2
parent27958e6c144eee64371be75afe82dd7b4505cd79 (diff)
Fix /feed.xml, https upgrade
-rw-r--r--templates/homepage/usr_local_etc_nginx_nginx.conf.j25
-rw-r--r--templates/ingress/usr_local_etc_nginx_nginx.conf.j210
2 files changed, 13 insertions, 2 deletions
diff --git a/templates/homepage/usr_local_etc_nginx_nginx.conf.j2 b/templates/homepage/usr_local_etc_nginx_nginx.conf.j2
index 079f89d..ee45405 100644
--- a/templates/homepage/usr_local_etc_nginx_nginx.conf.j2
+++ b/templates/homepage/usr_local_etc_nginx_nginx.conf.j2
@@ -41,10 +41,11 @@ http {
# Migration redirects from legacy site
location ~ ^/archive(?:/(.*))?$ {
- return 302 /posts/$1$is_args$args;
+ return 307 /posts/$1$is_args$args;
}
location = /feed.xml {
- return 302 /atom.xml;
+ # Serve atom.xml content at the legacy feed.xml URL (no redirect)
+ rewrite ^ /atom.xml break;
}
location / {
diff --git a/templates/ingress/usr_local_etc_nginx_nginx.conf.j2 b/templates/ingress/usr_local_etc_nginx_nginx.conf.j2
index 1e58153..16299ef 100644
--- a/templates/ingress/usr_local_etc_nginx_nginx.conf.j2
+++ b/templates/ingress/usr_local_etc_nginx_nginx.conf.j2
@@ -42,6 +42,16 @@ http {
{% for route in ingress_routes -%}
server {
+ listen 80;
+ listen [::]:80;
+ server_name {{ route.host }};
+
+ include /usr/local/etc/nginx/snippets/ban.inc;
+
+ return 307 https://$host$request_uri;
+ }
+
+ server {
server_name {{ route.host }};
http2 on;