| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- # from gis project
- server {
- listen 80;
- listen [::]:80;
- server_name localhost;
- set $root '/usr/share/nginx/html';
- root $root;
- location / {
- index index.html index.htm;
- add_header Access-Control-Allow-Origin *;
- try_files $uri $uri/ @router;
- }
- location @router {
- rewrite ^.*$ /index.html last;
- }
- location /api/ {
- proxy_pass http://admin:2021/;
- proxy_read_timeout 300s;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header x-forwarded-for $remote_addr;
- proxy_set_header REMOTE-HOST $remote_addr;
- add_header X-Cache $upstream_cache_status;
- #Set Nginx Cache
- add_header Cache-Control no-cache;
- if ( $uri ~* "/profile.*/(.*)" ){
- add_header Access-Control-Expose-Headers "Content-Disposition";
- add_header Content-Disposition "attachment;filename=$1";
- }
- }
- location ~ /.well-known {
- allow all;
- autoindex on;
- autoindex_exact_size off;
- autoindex_localtime on;
- }
- #location ~ /\.ht {
- # deny all;
- #}
- }
|