netlify / netlify-playground

https://play.netlify.com
MIT License
89 stars 16 forks source link

Headers tool doesn't show error for invalid rules #32

Closed edmorley closed 8 months ago

edmorley commented 6 years ago

STR

  1. Visit https://play.netlify.com/headers
  2. Enter this in the text area:
    index.html
    X-Frame-Options: DENY
  3. Press "Test rules"

Expected

Error shown saying the entered rules are invalid (since it is missing the leading /).

Actual

The page doesn't appear to change at all, making it hard to know whether the tool is working or not. No errors shown in the browser console.

If I instead enter valid input, I see a green Yay! All headers are valid message - so currently the only way to know what I entered was invalid, is by the absence of the success message. Compare to the redirects tool (https://play.netlify.com/redirects), where entering invalid input results in an error message being shown.

Reproduced using Firefox Nightly and Chrome Beta.

tigerclaw-az commented 6 years ago

I just had this same issue, except my rule was missing the : and still said it was invalid, until I went to deploy my changes and the whole site didn't load...