Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
452 views
by

In locations.conf for caching static files webinoly has included protection & security headers. Since in webinoly those headers are already included in server and http { } context, what's the purpose of including again in locations.conf when caching static files?

1 Answer

0 votes
by Expert
Please, read the Nginx documentation to better understand how the "add_header" command works.

Also, try removing the headers from "locations.conf" file, try adding one more header in a server nginx block and see what happens. That's the best way to learn these things.
by

Hello QROkes,

What I have learned so far is that "add_header gets inherited by all child contexts, so that will have no effect whatsoever."

You have been helping a lot of people who are grateful of what you're doing.

Why not give an answer about the protection headers that you have included twice when caching static files?

by Expert
Don't get me wrong, I'm actually trying to help you.

Did you try adding and removing the headers as I said in my previous answer?

What did you get?
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...