Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
krombel committed Apr 10, 2024
1 parent 252f91f commit 531e4c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nginx/domains/doh.ffmuc.net.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ server {

set $wiki_page "https://ffmuc.net/wiki/doku.php?id=knb:dohdot";

if ( $request_method !~ ^(GET|POST|HEAD)$ ) {
if ( $request_method !~ ^(GET|POST|HEAD|OPTIONS)$ ) {
return 501;
}
if ($host ~ ^(dns|dot|anycast\d*)\.ffmuc\.net$) {
Expand Down Expand Up @@ -72,6 +72,11 @@ server {
# Allows caching of CORS response for upto 1 day;
# Firefox overwrites to max 1 day; Chrome overwrites to max 2hr
add_header 'Access-Control-Max-Age' 86400;

# somehow the headers are not set in this context => set again
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
return 204;
}
}
Expand Down

0 comments on commit 531e4c9

Please sign in to comment.