npm run serve handle post request on static page

(Johan) #1

Hi all,
In Nginx we could do the following to allow for post request to access static page.

To allow POST on static pages

    error_page  405     =200 $uri;

I wonder if there is the equivalent configuration for
npm run serve

I need it to serve static page to mimic my pages responses when testing.

Best Regards,

(Johan) #2

So I managed to bypass the problem with a simple reroute to my nginx post to static enabled site with a proxy configuration instead through vue.config.js

module.exports = {
devServer: {
proxy: ‘http://localhost