diff --git a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp
index e1afe4a954..c887b872b4 100644
--- a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp
+++ b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp
@@ -498,7 +498,7 @@ namespace CefSharp
{
for each (CefCustomScheme^ scheme in _schemes->AsReadOnly())
{
- registrar->AddCustomScheme(StringUtils::ToNative(scheme->SchemeName), scheme->IsStandard, scheme->IsLocal, scheme->IsDisplayIsolated, scheme->IsSecure, scheme->IsCorsEnabled, false);
+ registrar->AddCustomScheme(StringUtils::ToNative(scheme->SchemeName), scheme->IsStandard, scheme->IsLocal, scheme->IsDisplayIsolated, scheme->IsSecure, scheme->IsCorsEnabled, scheme->IsCSPBypassing);
}
}
}
\ No newline at end of file
diff --git a/CefSharp.Core/Internals/CefSharpApp.h b/CefSharp.Core/Internals/CefSharpApp.h
index a3dfe1f83f..e5c79f3f71 100644
--- a/CefSharp.Core/Internals/CefSharpApp.h
+++ b/CefSharp.Core/Internals/CefSharpApp.h
@@ -74,7 +74,8 @@ namespace CefSharp
argument += (scheme->IsLocal ? "T" : "F") + "|";
argument += (scheme->IsDisplayIsolated ? "T" : "F") + "|";
argument += (scheme->IsSecure ? "T" : "F") + "|";
- argument += (scheme->IsCorsEnabled ? "T" : "F") + ";";
+ argument += (scheme->IsCorsEnabled ? "T" : "F") + "|";
+ argument += (scheme->IsCSPBypassing ? "T" : "F") + ";";
}
argument = argument->TrimEnd(';');
@@ -117,7 +118,7 @@ namespace CefSharp
{
for each (CefCustomScheme^ scheme in _cefSettings->CefCustomSchemes)
{
- auto success = registrar->AddCustomScheme(StringUtils::ToNative(scheme->SchemeName), scheme->IsStandard, scheme->IsLocal, scheme->IsDisplayIsolated, scheme->IsSecure, scheme->IsCorsEnabled, false);
+ auto success = registrar->AddCustomScheme(StringUtils::ToNative(scheme->SchemeName), scheme->IsStandard, scheme->IsLocal, scheme->IsDisplayIsolated, scheme->IsSecure, scheme->IsCorsEnabled, scheme->IsCSPBypassing);
if (!success)
{
diff --git a/CefSharp/CefCustomScheme.cs b/CefSharp/CefCustomScheme.cs
index 7d4a2b0a9a..9844ceec4c 100644
--- a/CefSharp/CefCustomScheme.cs
+++ b/CefSharp/CefCustomScheme.cs
@@ -87,6 +87,12 @@ public sealed class CefCustomScheme
///
public bool IsCorsEnabled { get; set; }
+ ///
+ /// If true the scheme can bypass Content-Security-Policy(CSP) checks.
+ /// This value should be false in most cases where IsStandard is true.
+ ///
+ public bool IsCSPBypassing { get; set; }
+
///
/// Factory Class that creates instances
/// for handling scheme requests.
@@ -103,6 +109,7 @@ public CefCustomScheme()
IsDisplayIsolated = false;
IsSecure = true;
IsCorsEnabled = true;
+ IsCSPBypassing = false;
}
///
@@ -128,7 +135,8 @@ public static List ParseCommandLineArguments(IEnumerable