This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
27 additions
and
29 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
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,36 +1,36 @@ | ||
# NOTE: This file will only work with an app hosted at root | ||
# it is not the case here ("homename": "https://.../keyclaokify-demo-app") | ||
server { | ||
listen 80; | ||
|
||
location /keycloakify-demo-app { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
root /usr/share/nginx/html; | ||
|
||
} | ||
try_files $uri $uri/ /index.html; | ||
|
||
# Any route containing a file extension (e.g. /devicesfile.js) | ||
location ~ ^.+\..+$ { | ||
try_files $uri =404; | ||
|
||
#location ~* \.(?:manifest|appcache|html?|xml|json)$ { | ||
# expires -1; | ||
#} | ||
location ~* \.(?:html|json|txt)$ { | ||
expires -1; | ||
} | ||
|
||
#location ~* \.(?:css|js|eot|ttf|woff|woff2|svg)$ { | ||
# try_files $uri =404; | ||
# expires 1y; | ||
# access_log off; | ||
# add_header Cache-Control "public"; | ||
#} | ||
# CRA generates filenames with hashes so we can | ||
# tell the browser to keep in cache the resources. | ||
location ~* \.(?:css|js|woff2?|eot|ttf|xml)$ { | ||
expires 1y; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
|
||
#location ~* \.(eot|ttf|woff|woff2|svg)$ { | ||
# add_header Access-Control-Allow-Origin *; | ||
#} | ||
# Allow font to be downloaded from pages | ||
# served by Keycloak | ||
location ~* \.(?:woff2?|eot|ttf|xml)$ { | ||
add_header Access-Control-Allow-Origin *; | ||
} | ||
|
||
## Any route containing a file extension (e.g. /devicesfile.js) | ||
#location ~ ^.+\..+$ { | ||
# try_files $uri =404; | ||
#} | ||
} | ||
|
||
## Any route that doesn't have a file extension (e.g. /devices) | ||
#location / { | ||
# try_files $uri $uri/ /index.html; | ||
#} | ||
} | ||
|
||
} |
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