-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from leanstacks/feature/issue-8
Docker HSTS and NGINX
- Loading branch information
Showing
2 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
# Basic NGINX configuration for a Single-Page Application (SPA) | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
# HSTS - Add HSTS header to all responses | ||
add_header Strict-Transport-Security "max-age=600; includeSubDomains" always; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
|
||
# This try_files statement facilitates SPA framework routing | ||
try_files $uri $uri/ /index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |