From dc588a8203ffa17ce4ad4161c99b4f21ca44e563 Mon Sep 17 00:00:00 2001 From: Kara Brightwell Date: Wed, 24 Jun 2026 12:18:52 +0100 Subject: [PATCH] Add constants for http(s) and ws(s) scheme sources --- packages/csp-header/src/constants/values.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/csp-header/src/constants/values.ts b/packages/csp-header/src/constants/values.ts index 51abe37..9dc72e5 100644 --- a/packages/csp-header/src/constants/values.ts +++ b/packages/csp-header/src/constants/values.ts @@ -21,6 +21,8 @@ export const ALLOW_TOP_NAVIGATION_BY_USER_ACTIVATION = "allow-top-navigation-by- export const BLOB = 'blob:'; export const BLOCK = "'block'"; export const DATA = 'data:'; +export const HTTP = 'http:'; +export const HTTPS = 'https:'; export const NO_REFERRER = "'no-referrer'"; export const NONE = "'none'"; export const NONE_WHEN_DOWNGRADE = "'none-when-downgrade'"; @@ -36,6 +38,8 @@ export const UNSAFE_HASHES = "'unsafe-hashes'"; export const UNSAFE_INLINE = "'unsafe-inline'"; export const UNSAFE_URL = "'unsafe-url'"; export const WASM_UNSAFE_EVAL = "'wasm-unsafe-eval'"; +export const WS = 'ws:'; +export const WSS = 'wss:'; // @deprecated Use UNSAFE_EVAL export const EVAL = "'unsafe-eval'";