blason Wrote:
-------------------------------------------------------
> Hi Folks,
> 
> I am trying to setup a reverse proxy on nginx with server at backend
> and from HAR file I understand it uses Oauth-Token-2.0 with POST
> method.
> 
> However I am unable to set the stuff and seeking help here.
> 
> My original server here is assuming
> 
> https://test.example.net:9084
> And for Outh from har file I can see the request goes to
> https://test.example.net:99/connect/token
> 
> Here is my config
> *********************************
> server {
>         listen 443 ssl;
>         listen 8084;
>         listen 88;
>         server_name test.example.net;
>         ssl_protocols  TLSv1.1 TLSv1.2;
>        ssl_certificate           /etc/nginx/certs/star_xxxx.com.crt;
>        ssl_certificate_key       /etc/nginx/certs/server.key;
>        ssl on;
>         ssl_ciphers
> 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
>         gzip on;
>         gzip_proxied any;
>         gzip_types text/plain text/xml text/css
> application/x-javascript;
>         gzip_vary on;
>         gzip_comp_level 6;
>         gzip_buffers 16 8k;
>         gzip_http_version 1.1;
>         gzip_min_length 256;
>         gzip_disable "MSIE [1-6]\.(?!.*SV1)";
>         ssl_prefer_server_ciphers on;
>         ssl_session_cache shared:SSL:10m;
>         access_log /var/log/nginx/test/access.log;
>         error_log /var/log/nginx/test/error.log;
> 
> 
> location / {
>         proxy_pass https://test.example.net:9084;
>         proxy_redirect  https://test.example.net:99/ /;
>        client_max_body_size    10m;
>         client_body_buffer_size 128k;
>         #proxy_redirect off;
>         proxy_send_timeout   90;
>         proxy_read_timeout   90;
>         proxy_buffer_size    128k;
>         proxy_buffers     4 256k;
>         proxy_busy_buffers_size 256k;
>         proxy_temp_file_write_size 256k;
>         proxy_connect_timeout 30s;
>         proxy_set_header   Host   $host;
>         proxy_set_header   X-Real-IP  $remote_addr;
>         proxy_set_header  X-Forwarded-Proto  $scheme;
>         proxy_set_header   X-Forwarded-For
> $proxy_add_x_forwarded_for;
>         add_header Strict-Transport-Security "max-age=31536000;
> includeSubDomains" always;
>         add_header X-Content-Type-Options nosniff;
>         add_header X-XSS-Protection "1; mode=block";
>         add_header Referrer-Policy "no-referrer-when-downgrade";
>         add_header X-Frame-Options "SAMEORIGIN" always;
>         }

Here are HAR file Headers

Date    
Tue, 30 Jul 2019 07:56:26 GMT
Strict-Transport-Security       
max-age=31536000; includeSubDomains
X-Content-Type-Options  
nosniff
X-AspNet-Version        
4.0.30319
X-Powered-By    
ASP.NET
Connection      
keep-alive
Content-Length  
919
X-XSS-Protection        
1; mode=block
Pragma  
no-cache
Referrer-Policy 
no-referrer-when-downgrade
Server  
nginx
X-Frame-Options 
SAMEORIGIN
Access-Control-Allow-Methods    
*
Content-Type    
application/json; charset=utf-8
Access-Control-Allow-Origin     
*
Cache-Control   
no-store, no-cache, max-age=0, private
Access-Control-Allow-Headers    
Origin, X-Requested-With, Content-Type, Accept
Request Headers
Accept  
application/json, text/plain, */*
Referer 
https://test.example.net/
Origin  
https://test.example.net
User-Agent      
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/75.0.3770.142
 Safari/537.36
Content-Type    
application/x-www-form-urlencoded

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,285048,285049#msg-285049

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to