Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- erver {
- listen 9090 default_server;
- listen [::]:9090 default_server ipv6only=on;
- root /usr/share/nginx/html/secucar/public_html;
- index index.html index.htm;
- # Make site accessible from http://localhost/
- server_name localhost;
- location / {
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- # try_files $uri $uri/ =404;
- # For CORS
- if ($request_method = OPTIONS ) {
- add_header Access-Control-Allow-Origin "$http_origin"; # <- needs to be updated
- add_header Access-Control-Allow-Methods "GET, OPTIONS, POST";
- add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
- add_header Access-Control-Allow-Credentials "true"; # <- Basic Auth stuff, again
- add_header Content-Length 0;
- add_header Content-Type text/plain;
- add_header 'Access-Control-Max-Age' 1728000;
- return 204;
- }
- root /usr/share/nginx/html/secucar/public_html;
- index index.html;
- }
- location /secucar {
- proxy_pass http://127.0.0.1:8080/;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement