Skip to content

Is it necessary to set secure header for JavaScript file? #64

Closed Answered by righettod
owem777 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Thank you very much for your very interesting question 😃

For your context (self hosted static JS script), I propose to set the following HTTP response header:

  • Strict-Transport-Security: To ensure that the script is delivered using a secure channel (HTTPS).
  • X-Content-Type-Options: To prevent MIME type abuse for IE/Chrome context.
  • Cross-Origin-Embedder-Policy + Cross-Origin-Opener-Policy + Cross-Origin-Resource-Policy: To prevent a remote site to load your script and also isolate the browsing context at browser level.

@riramar What do you think about my proposal?

@owem777 I hope this can help you, feel free to indicate to us if it is not the case and then we will deep dive into your c…

Replies: 6 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@pfreitag
Comment options

@righettod
Comment options

@owem777
Comment options

Answer selected by owem777
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@righettod
Comment options

@owem777
Comment options

@righettod
Comment options

Comment options

You must be logged in to vote
1 reply
@owem777
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
done Work on the topic is finished
5 participants