Hi @digiscrap , thanks for your topic, I am Andrea and I will help you with your request. When you do the verification tests it might show you the notification “duplicate headers“, this doesn’t cause any issues to the website or loading, to confirm me it is normal to see some duplicate headers if hosting by standard adds some headers but they will be taken as important those of the plugin.
I am available for further questions or help
Hello and thank you. It does not show the notification. It shows duplicate RAW header lines. Please see the report: https://securityheaders.com/?q=digiscrap.plus&followRedirects=on
You see that the lines below are in the report, but the lines are the same:
access-control-allow-origin null
access-control-allow-methods GET,PUT,POST,DELETE
access-control-allow-headers Content-Type, Authorization
x-content-security-policy default-src ‘self’; img-src *; media-src * data:;
access-control-allow-origin null
access-control-allow-methods GET,PUT,POST,DELETE
access-control-allow-headers Content-Type, Authorization
x-content-security-policy img-src *; media-src * data:;
I can’t upload images here, so please create a report and look at the RAW headers section
thanks Vincent
-
This reply was modified 3 years, 1 month ago by
digiscrap.
This header duplication is likely the result of the plugin adding Header set directives to .htaccess, but also adding these headers at response time.
I don’t think it hurts, assuming both sets of headers are in sync (and they should be now), but I don’t think it adds much value either. I guess the only downside of not having these directives in .htaccess would be that they wouldn’t be sent with error responses and non-PHP responses such as file downloads. Which, at least to me, is acceptable.
On the other hand, .htaccess file is Apache-specific, so, it has no effect whatsoever on Nginx and other web servers. Plus, even on Apache it may be ignored or even cause server configuration errors when it’s not ignored, but disallowed instructions are used.
@unicorn03, would you consider dropping the .htaccess support altogether? It would allow you remove a great deal of code from the plugin. Alternatively, it could be placed behind a settings checkbox or drop-down.