Switch language한국어
Back to the list

How to set Content Security Policy with a Meta Tag?

TL;DR AI

Key summary

2 min read
  1. You can set Content Security Policy with a `<meta http-equiv="Content-Security-Policy">` tag in HTML.

  2. This is useful for static sites, prototypes, and environments where you cannot control response headers.

  3. However, it does not protect early requests, so it is less complete than an HTTP response header.

  4. It also does not support some directives such as `report-uri`, `report-to`, `frame-ancestors`, and `sandbox`.

Read the original