Skip to content

Commit

Permalink
Add server block to reject requests without host header
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdibari committed Jun 18, 2021
1 parent 2391140 commit c30e01d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/nginx/templates/mtdj/nginx.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ upstream app_server {
server 127.0.0.1:{{ wsgi_server_port }};
}

server {
listen 443 default_server ssl;
server_name _ "" default_server;
access_log /var/log/nginx/access.log access;

return 444;
}

server {
listen 443 ssl http2;
server_name {{ app_hostname }} admin.{{ app_hostname }};
Expand Down

0 comments on commit c30e01d

Please sign in to comment.