0

when my client does a POST request to the directory "/Session/login" nginx gives a 301 redirect to "/Session/login/", but the request gets changed to a GET request. I heard using 308 instead of 301 would fix that but how do I use 308 instead of 301?

I tried using return 308; but it didn't work so any suggestions?

Here's my nginx.conf



#user  nobody;
worker_processes  1;



pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/json;

    sendfile        on;

    keepalive_timeout  65;

    

    # HTTPS server
    
    server {
        listen       17217 ssl;
        server_name  nba2k17-ws.2ksports.com;
        default_type  application/json;
    ssl_certificate cert.pem;
    ssl_certificate_key cert-key.pem;
    root wwwroot;


    location /bbb {
        index index.html;

    }

    location / {

    index nonextistent;
    autoindex on;
    autoindex_format xml;

    }

    location /Session {
    index discovery.js;
    }

    location = /Session/login/ {
        root wwwroot;
    autoindex on;

    
    }
    location = /Session/login {
        root wwwroot;
    autoindex on;

    
    }

        
    }
    

}

Vivek Lele
  • 109
  • 4

0 Answers0