Welcome! Log In Create A New Profile


Nginx 405 not allowed issue

November 13, 2019 11:24AM

I want to allow to accept post request for static content by nginx server.

i have three solution so i can add patches. take a look below.

1.) error_page 405 =200 $uri

This basically tells nginx to change the response code to 200 for 405 messages

2.) location / {
rewrite ^.*$ /ampsec-tv-widget.html last;
# To allow POST on static pages
error_page 405 = $uri;

first we send POST request to api.json (which is our static file), then we proxy 405 error to the original url and our rewrite condition matches the request and return api.json with 200 status code

3.) create a proxy for static content, converting POST request to GET.

But i want to add any patch. is there is any other solution to make request for static content by nginx server
Subject Author Posted

Nginx 405 not allowed issue

skumar48 November 13, 2019 11:24AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 76
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready