• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue newline character in nginx headers should not be accepted

johnrdorazio

Basic Pleskian
I recently ran into an issue when updating the Content Security Policy in my nginx headers, using the "Additional nginx directives" textarea for a domain. I started getting an ERR_HTTP2_PROTOCOL_ERROR on Chrome and Edge, but not on Firefox. I couldn't for the life of me figure out why, for such a simple change in the headers, I had simply added a new domain to the accepted `script-src` list of domains), but I figured I would try to undo the change by removing the new domain I had added. Still no luck, still getting same error on Chrome and Edge. I was looking into all sorts of solutions on stackoverflow, which suggested turning gzip on or off, or making sure the declared size of the document corresponded with the actual size... I finally found the problem when issuing `curl -v https://mydomain.example`, I could see the newline in the middle of the Content Security Policy header. Funny thing is I couldn't see it from the Plesk interface because it was occurring right near where a natural break would have occurred anyways in the textarea. After making sure that newline character was gone, my website started responding correctly again both on Chrome and Edge.

I would suggest that the Plesk "linting" when saving the headers check for newline characters within a single header, and issue a warning if one is found. Firefox seems to not complain, but Chrome and Edge will not like it.
 
Back
Top