2

In Docusaurus v2 I want to implement some security headers. But I couldn't find any documentation about security headers in Docusaurus. Here are some header I want to add, especially to prevent other embed my docusaurus web as iframe.

 headers: [
                {
                    key: 'X-XSS-Protection',
                    value: '1; mode=block',
                },
                {
                    key: 'X-Content-Type-Options',
                    value: 'nosniff',
                },
                {
                    key: 'X-Download-Options',
                    value: 'noopen',
                },
                {
                    key: 'Cache-Control',
                    value: 'no-store',
                },
                {
                    key: 'X-Frame-Options',
                    value: 'SAMEORIGIN',
                },
            ],

How do I do this?

Russia Must Remove Putin
  • 374,368
  • 89
  • 403
  • 331
Irene
  • 21
  • 1
  • This is going to depend on how you're deploying docusaurus, since the headers should be returned by your web server – marcosnils Jul 01 '22 at 18:11

0 Answers0