0

Just started using my very first nginx server and I have added few header, but I was wondering, is it possible somehow to import those headers from different file?

Let,s say, I have a _headers file with such content:

add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "SAME-ORIGIN";
add_header Feature-Policy "geolocation 'none'; microphone 'none';";

And can I somehow import it into my /etc/nginx/sites-available/example.com?

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
Defracted
  • 1
  • 1

1 Answers1

0

Well, this looks like this is a possible thing! I used "include" directive for that and it worked pretty good!

Found it here

Defracted
  • 1
  • 1