CSP form-action also blocks the redirect after a form POST, and Chrome's error names the wrong URL

javascript dev.to

Disclosure: I build Formgong, a form backend. We hit this bug on our own review page. We were building a plain HTML page where customers leave a review: stars, a name, a text box, a submit button, no JavaScript. The page has a Content-Security-Policy with form-action 'self'. The form posts to /submit, and the server answers with a 303 back to a thank-you page. In local development the redirect pointed at a different port. We pressed Send and nothing happened. The page didn't move, the button d

Read Full Tutorial open_in_new
arrow_back Back to Tutorials