Answer the question
In order to leave comments, you need to log in
How to implement DELETE method in nodejs behind nginx?
Good afternoon,
I am writing a service for storing pictures, and now I have problems with deleting.
All incoming requests are received by nginx, which redirects everything except static to nodejs. The nginx config looks like this:
location / {
proxy_pass http://images/;
...
}
location /images/ {
location ~* ^.+\.(jpg|jpeg|gif|png|svg)$ {
try_files $uri $uri/;
}
}
Answer the question
In order to leave comments, you need to log in
Can you check somehow
location ~* ^/images/.+\.(jpg|jpeg|gif|png|svg)$ {
if ($request_method !~ ^(GET|HEAD)$) {
proxy_pass http://images/;
}
if ($request_method ~ ^(GET|HEAD)$) {
try_files $uri $uri/;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question