Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h

Issue 1747263002: CORS-RFC1918: Introduce 'treat-as-public-address' CSP directive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iprange
Patch Set: feedback/rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
index 7c0d2be6e54cb40f9b54e9ec4b096995fac63d8e..69473b1f0aca18e70aac705e03d6f5f2b78be257 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -106,6 +106,9 @@ public:
// https://metromoxie.github.io/webappsec/specs/suborigins/index.html
static const char Suborigin[];
+ // https://mikewest.github.io/cors-rfc1918/#csp
+ static const char TreatAsPublicAddress[];
+
enum ReportingStatus {
SendReport,
SuppressReport
@@ -247,6 +250,7 @@ public:
void enforceSandboxFlags(SandboxFlags);
void enforceSuborigin(const String&);
void enforceStrictMixedContentChecking();
+ void treatAsPublicAddress();
String evalDisabledErrorMessage() const;
void setInsecureRequestsPolicy(SecurityContext::InsecureRequestsPolicy);
@@ -307,6 +311,7 @@ private:
String m_suboriginName;
bool m_enforceStrictMixedContentChecking;
ReferrerPolicy m_referrerPolicy;
+ bool m_treatAsPublicAddress;
String m_disableEvalErrorMessage;
SecurityContext::InsecureRequestsPolicy m_insecureRequestsPolicy;

Powered by Google App Engine
This is Rietveld 408576698