From eae4e3b6c84cbc9ddfae95129be46913d7f92a8c Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Sat, 19 Aug 2023 07:25:46 +0300 Subject: [PATCH] force https://ipc.localhost on ngaccount web page --- ngaccount/src/main.rs | 4 ++++ ngaccount/web/index.html | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/ngaccount/src/main.rs b/ngaccount/src/main.rs index 1a682a7..20653b5 100644 --- a/ngaccount/src/main.rs +++ b/ngaccount/src/main.rs @@ -259,7 +259,11 @@ async fn main() -> anyhow::Result<()> { headers.insert( "Content-Security-Policy", HeaderValue::from_static( + #[cfg(debug_assertions)] + "default-src 'self' data:; connect-src ipc: https://ipc.localhost 'self' http://192.168.192.2:3031", + #[cfg(not(debug_assertions))] "default-src 'self' data:; connect-src ipc: https://ipc.localhost 'self'", + ), ); diff --git a/ngaccount/web/index.html b/ngaccount/web/index.html index a05053c..842be0a 100644 --- a/ngaccount/web/index.html +++ b/ngaccount/web/index.html @@ -56,6 +56,12 @@
+ \ No newline at end of file