@@ -0,0 +1,36 @@
1+From 0de0a90f8fe5e1e48fa4ec7aa7c825ef88770f9d Mon Sep 17 00:00:00 2001
2+From: Ryan Foster <RytoEX@gmail.com>
3+Date: Mon, 9 Sep 2019 23:55:02 -0400
4+Subject: [PATCH] Enable file access and universal access for file URLs
5+
6+When loading a local file, instead of disabling CEF's web security,
7+enable file access and universal access for file URLs. This should allow
8+local files to make CORS requests without completely disabling CEF's
9+security model.
10+---
11+ obs-browser-source.cpp | 9 ++++++---
12+ 1 file changed, 6 insertions(+), 3 deletions(-)
13+
14+diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp
15+index ab1181e..c775283 100644
16+--- a/plugins/obs-browser/obs-browser-source.cpp
17++++ b/plugins/obs-browser/obs-browser-source.cpp
18+@@ -179,9 +179,12 @@ bool BrowserSource::CreateBrowser()
19+
20+ #if ENABLE_LOCAL_FILE_URL_SCHEME
21+ if (is_local) {
22+- /* Disable web security for file:// URLs to allow
23+- * local content access to remote APIs */
24+- cefBrowserSettings.web_security = STATE_DISABLED;
25++ /* Enable file access and universal access from file://
26++ * URLs to allow local content access to remote APIs */
27++ cefBrowserSettings.file_access_from_file_urls =
28++ STATE_ENABLED;
29++ cefBrowserSettings.universal_access_from_file_urls =
30++ STATE_ENABLED;
31+ }
32+ #endif
33+
34+--
35+2.31.1
36+