mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
6ac3a49db2
1. changed location from "~" (case sensitive!) to "~*" (case insensitive!) to also match uppercase static assets. (http://nginx.org/en/docs/http/ngx_http_core_module.html#location) 2. added regex "jpe?g" to match "jpg" and "jpeg" in one command.
17 lines
611 B
Nginx Configuration File
17 lines
611 B
Nginx Configuration File
server {
|
|
listen 80 default_server;
|
|
charset utf-8;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# When requesting static paths with extension, try them, and return a 404 if not found
|
|
location ~* .+\.(css|js|html|png|jpe?g|gif|bmp|ico|json|csv|otf|eot|svg|svgz|ttf|woff|woff2|ijmap|pdf|tif|map) {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# When requesting a path without extension, try it, and return the index if not found
|
|
# This allows HTML5 history paths to be handled by the client application
|
|
location / {
|
|
try_files $uri $uri/ /index.html$is_args$args;
|
|
}
|
|
}
|