Answer the question
In order to leave comments, you need to log in
Nginx, trailing slash and POST requests?
Good afternoon, Habralyudi!
There was a question related to the nginx configuration:
Now the config looks like this:
server {
listen 80;
server_name erk.dev;
location / {
root /opt/web/nginx/sites/erk.dev/code;
access_log /opt/web/nginx/sites/erk.dev/logs/access.log;
error_log /opt/web/nginx/sites/erk.dev/logs/error.log;
}
location /app {
proxy_pass http://127.0.0.1:9090/kyber;
access_log /opt/web/nginx/logs/upstreams/erk.access.log upstreamlog;
error_log /opt/web/nginx/logs/upstreams/erk.error.log;
}
}
Answer the question
In order to leave comments, you need to log in
Most likely (99%) the redirect comes from the backend.
Try like this
location /app {
if ($request_method !~ ^(POST)$ ) {
return 444;
}
proxy_pass proxy_pass http://127.0.0.1:9090/kyber/app/$is_args$args;
access_log /opt/web/nginx/logs/upstreams/erk.access.log upstreamlog;
error_log /opt/web/nginx/logs/upstreams/erk.error.log;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question