server {
        listen 8080;
        server_name localhost;

        location / {
            root /usr/share/nginx/html;
            index index.html index.htm;
            try_files $uri $uri/ /index.html =404;
            add_header Access-Control-Allow-Origin *;
            proxy_ssl_certificate     /etc/nginx/cert.pem;
            proxy_ssl_certificate_key /etc/nginx/key.pem;
        }
        location /api {
            proxy_pass http://backend:1443/api;
            add_header Access-Control-Allow-Origin *;
        }
        location /OAuth2Login {
            proxy_pass http://backend:1443/OAuth2Login;
            add_header Access-Control-Allow-Origin *;
        }
        location /OAuth2Callback {
            proxy_pass http://backend:1443/OAuth2Callback;
            add_header Access-Control-Allow-Origin *;
        }
        location /Logout {
            proxy_pass http://backend:1443/Logout;
            add_header Access-Control-Allow-Origin *;
        }
}
