documentation icon indicating copy to clipboard operation
documentation copied to clipboard

fix HSTS header in nginx subdir configuration

Open fdiwald opened this issue 4 years ago • 2 comments

Headers defined in a specific section are overwritten if there are additional headers defined in a subsection. This is true for the header for HSTS (Strict-Transport-Security) in the server section which is overwritten by the headers in the location ^~ /nextcloud section. This is documented in the nginx documentation. This solution only sends the header for the nextcloud-subdir. I guess it would be more correct to set the header for all locations but I did not find an elegant solution to that problem. Maybe an nginx pro could come up with a better solution. Signed-off-by: Florian Diwald [email protected]

fdiwald avatar Apr 18 '21 13:04 fdiwald

This solution only sends the header for the nextcloud-subdir. I guess it would be more correct to set the header for all locations but I did not find an elegant solution to that problem.

What about just adding add_header in both sections? May not be elegant, but an imperfect solution is better than no solution at all :)

Tachi107 avatar Jan 07 '22 16:01 Tachi107

Correct. This is the consequence of my approach. If you add a directory (for instance /collabora) you should add the headers there too.

fdiwald avatar Jan 07 '22 19:01 fdiwald

Conflicts, unfortunately

ChristophWurst avatar May 26 '23 12:05 ChristophWurst

@ChristophWurst is there still something I have to fix or is this pull request ready for review? Honestly, I am a bit overwhelmed by the checks here. Not sure what they mean.

Edit: I got two E-Mails with this error: "Generate catalog templates (POT) files fetched automatically by transifex: All jobs have failed" Is this something to worry about?

fdiwald avatar May 27 '23 09:05 fdiwald

It should be fine

ChristophWurst avatar Jun 26 '23 07:06 ChristophWurst

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/documentation/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

welcome[bot] avatar Jun 26 '23 07:06 welcome[bot]