You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I'm using the latest major release. Only such installations are supported.
Yes, I'm using the supported system. Only such systems are supported.
Yes, I have read all WIKI document,nothing can help me in my problem.
Yes, I've searched similar issues on GitHub and didn't find any.
Yes, I've included all information below (version, config, log, etc).
Description of the problem,screencshot would be good
Web panel does not load if I have the content-security-policy header in the nginx config
Try add header add_header content-security-policy "default-src 'self';" always;
browser will give out the following error when visiting the x-ui web panel: Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-xxx'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.
where as, there are no issues at all visiting the root address.
And if I disable this header: add_header content-security-policy "default-src 'self';" always;
the web panel is working perfectly.
Version of xray-ui
xray-ui version 24.11.22nginx version 1.18.0
xray-ui log reports or xray log
No error for x-ui.
The text was updated successfully, but these errors were encountered:
Welcome
Description of the problem,screencshot would be good
Web panel does not load if I have the content-security-policy header in the nginx config
Try add header
add_header content-security-policy "default-src 'self';" always;
browser will give out the following error when visiting the x-ui web panel:
Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-xxx'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.
where as, there are no issues at all visiting the root address.
And if I disable this header:
add_header content-security-policy "default-src 'self';" always;
the web panel is working perfectly.
Version of xray-ui
xray-ui log reports or xray log
No error for x-ui.
The text was updated successfully, but these errors were encountered: