diff --git a/default.conf b/default.conf index 410a7ed..550a552 100755 --- a/default.conf +++ b/default.conf @@ -3,6 +3,7 @@ server { listen 80; listen [::]:80; server_name localhost; + default_type text/html; #access_log /var/log/nginx/host.access.log main; @@ -69,11 +70,12 @@ server { } location /ip { + default_type text/plain; return 200 "$remote_addr"; } location /ip/json { - add_header Content-Type "application/json"; + default_type application/json; return 200 '{"ip":"$remote_addr"}'; } @@ -112,8 +114,9 @@ server { location /.git { # There is no standard way to present options, but in the rare cases that 300 is used it just has a list of links. The Location header is for preferred thing. + default_type "text/html"; add_header Location "https://git.askiiart.net/askiiart/askiiart-net"; - return 300 'Self-hosted
GitHub'; + return 200 'Self-hosted
GitHub'; } error_page 300 /error/300.html;