From fbf75b1d14e311479197224fee71883da9589191 Mon Sep 17 00:00:00 2001 From: stffabi Date: Sat, 5 Mar 2022 03:32:28 +0100 Subject: [PATCH] [v2, windows] Move assets from file://wails to https://wails.localhost (#1211) This should allow web workers to be used --- v2/internal/frontend/desktop/windows/frontend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/internal/frontend/desktop/windows/frontend.go b/v2/internal/frontend/desktop/windows/frontend.go index 8fc48e59..8532b8d6 100644 --- a/v2/internal/frontend/desktop/windows/frontend.go +++ b/v2/internal/frontend/desktop/windows/frontend.go @@ -55,7 +55,7 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger. bindings: appBindings, dispatcher: dispatcher, ctx: ctx, - startURL: "file://wails/", + startURL: "https://wails.localhost/", } bindingsJSON, err := appBindings.ToJSON() @@ -352,7 +352,7 @@ func (f *Frontend) processRequest(req *edge.ICoreWebView2WebResourceRequest, arg //Get the request uri, _ := req.GetUri() - res, err := common.ProcessRequest(uri, f.assets, "file", "wails") + res, err := common.ProcessRequest(uri, f.assets, "https", "wails.localhost") if err == common.ErrUnexpectedScheme { // In this case we should let the WebView2 handle the request with its default handler return