shithub: mycel

Download patch

ref: 2943c008d441d85701adc3e7c17b3b2ade061711
parent: f218656e11e164c8624b76aa193ecb196632c7cd
author: Philip Silva <[email protected]>
date: Sun Sep 4 19:23:29 EDT 2022

fix cors check

--- a/browser/fs/fs.go
+++ b/browser/fs/fs.go
@@ -179,7 +179,7 @@
 	url.Host = req.Host
 	if h := url.Host; h == "" {
 		url.Host = Fetcher.Origin().Host
-	} else if allowed(req.Header, h, Fetcher.Origin().Host) {
+	} else if !allowed(req.Header, h, Fetcher.Origin().Host) {
 		log.Errorf("no cross-origin request: %v", h)
 		return
 	}