Changing allow-origin to js files looks no longer necessary
This commit is contained in:
parent
270f3e9ffd
commit
e1d92bf0ec
1 changed files with 0 additions and 2 deletions
|
@ -278,8 +278,6 @@ class UiRequest(object):
|
|||
headers["X-Frame-Options"] = "SAMEORIGIN"
|
||||
if content_type != "text/html" and self.env.get("HTTP_REFERER") and self.isSameOrigin(self.getReferer(), self.getRequestUrl()):
|
||||
headers["Access-Control-Allow-Origin"] = "*" # Allow load font files from css
|
||||
if content_type == "text/javascript" and not self.env.get("HTTP_REFERER"):
|
||||
headers["Access-Control-Allow-Origin"] = "*" # Allow loading JavaScript modules in Chrome
|
||||
|
||||
if noscript:
|
||||
headers["Content-Security-Policy"] = "default-src 'none'; sandbox allow-top-navigation allow-forms; img-src 'self'; font-src 'self'; media-src 'self'; style-src 'self' 'unsafe-inline';"
|
||||
|
|
Loading…
Reference in a new issue