diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-23 08:16:49 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-23 08:16:49 +0000 |
commit | 4dc730a187d41f9f2dce4fe2680c32dcecb79b93 (patch) | |
tree | 67673deb1649dc0a40962e70e6da302d7b6c4bf0 /nixpkgs/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch | |
parent | 633cab0ecb07627706c6b523e219490f019eaab5 (diff) | |
parent | 7e567a3d092b7de69cdf5deaeb8d9526de230916 (diff) | |
download | nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.gz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.bz2 nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.lz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.xz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.zst nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.zip |
Merge commit '7e567a3d092b7de69cdf5deaeb8d9526de230916'
# Conflicts: # nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch')
-rw-r--r-- | nixpkgs/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch b/nixpkgs/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch new file mode 100644 index 000000000000..49d01bacbd10 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/obs-studio/Enable-file-access-and-universal-access-for-file-URL.patch @@ -0,0 +1,36 @@ +From 0de0a90f8fe5e1e48fa4ec7aa7c825ef88770f9d Mon Sep 17 00:00:00 2001 +From: Ryan Foster <RytoEX@gmail.com> +Date: Mon, 9 Sep 2019 23:55:02 -0400 +Subject: [PATCH] Enable file access and universal access for file URLs + +When loading a local file, instead of disabling CEF's web security, +enable file access and universal access for file URLs. This should allow +local files to make CORS requests without completely disabling CEF's +security model. +--- + obs-browser-source.cpp | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp +index ab1181e..c775283 100644 +--- a/plugins/obs-browser/obs-browser-source.cpp ++++ b/plugins/obs-browser/obs-browser-source.cpp +@@ -179,9 +179,12 @@ bool BrowserSource::CreateBrowser() + + #if ENABLE_LOCAL_FILE_URL_SCHEME + if (is_local) { +- /* Disable web security for file:// URLs to allow +- * local content access to remote APIs */ +- cefBrowserSettings.web_security = STATE_DISABLED; ++ /* Enable file access and universal access from file:// ++ * URLs to allow local content access to remote APIs */ ++ cefBrowserSettings.file_access_from_file_urls = ++ STATE_ENABLED; ++ cefBrowserSettings.universal_access_from_file_urls = ++ STATE_ENABLED; + } + #endif + +-- +2.31.1 + |