Skip to content

Commit 13157e9

Browse files
committed
Attempted to get an autoindex directory listing to work.
1 parent e79c0cd commit 13157e9

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

site-config/ddr0

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ set $NEL '{"report_to":"default","max_age":31536000,"include_subdomains":
2424
# Allow access for letsencrypt/certbot.
2525
location ~ /\.well-known {
2626
allow all;
27+
28+
#add_header X-Debug 1;
2729
}
2830

2931
#Otherwise, don't serve hidden files. (Not that there should be any.)
3032
location ~ /\. {
3133
deny all;
34+
35+
#add_header X-Debug 2;
3236
}
3337

3438

@@ -162,6 +166,22 @@ location ~ "^/(?:blog-posts/\d+\.)?[^\.]*(?:\.html)?$" {
162166
#add_header X-Debug 16;
163167
}
164168

169+
#Scratch space for embedding elsewhere.
170+
location ~ "^/scratch" {
171+
try_files $uri $uri.html =404;
172+
173+
#autoindex is broken
174+
autoindex on;
175+
176+
add_header Cache-Control "max-age=900";
177+
add_header Content-Security-Policy "default-src '*'";
178+
179+
add_header Report-To "${REPORT_TO}";
180+
add_header NEL "${NEL}";
181+
182+
#add_header X-Debug 17;
183+
}
184+
165185
#Catchall for text files and such.
166186
location / {
167187
set $DENY_ALL "default-src 'none'; object-src 'none'; frame-ancestors 'none'";
@@ -176,5 +196,5 @@ location / {
176196
add_header Cross-Origin-Embedder-Policy "require-corp";
177197
add_header Cross-Origin-Resource-Policy "same-origin";
178198

179-
#add_header X-Debug 17;
199+
#add_header X-Debug 18;
180200
}

0 commit comments

Comments
 (0)