CORS NOT WORKING — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberLoader

CORS NOT WORKING

did all the setting from this article
https://openlitespeed.org/kb/setting-up-cors-on-openlitespeed/

Still my header icons are breaking

URL: https://airfryerreviews.org/



this is my vhost file code

context / {
location $DOC_ROOT/
allowBrowse 1
extraHeaders Access-Control-Allow-Origin *

rewrite {
RewriteFile .htaccess
}
addDefaultCharset off

phpIniOverride {

}
}


and hta access code

<IfModule mod_rewrite.c>
######################
## Handling Options for the CORS
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [L,R=204]

###################
## Add custom headers

Header set X-Content-Type-Options "nosniff"
Header set X-XSS-Protection "1; mode=block"
# Always set these headers for CORS.
Header always set Access-Control-Max-Age 1728000
Header always set Access-Control-Allow-Origin: "*"
Header always set Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
Header always set Access-Control-Allow-Headers: "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,C$
Header always set Access-Control-Allow-Credentials true
</IfModule>
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!