how can enable CORS on openlitespeed (admin panel)?

Cold-Egg

Administrator
#2
You can try Access WebAdmin>Virtual Hosts>Context
Create a type and URl you want with Extra Headers: Access-Control-Allow-Origin *
Restart lsws gracefully
Then you can see Response Headers like this:
  1. Accept-Ranges: bytes
  2. Access-Control-Allow-Origin: *
  3. Cache-Control: public, max-age=604800
  4. Connection: Keep-Alive
  5. Content-Length: 0
  6. Content-Type: text/css
  7. Date: Mon, 02 Oct 2017 17:52:37 GMT
  8. Etag: "0-59d265d1-f2e9"
  9. Expires: Mon, 09 Oct 2017 17:52:37 GMT
  10. Last-Modified: Mon, 02 Oct 2017 16:14:09 GMT
  11. Server: LiteSpeed
 
#3
You can try Access WebAdmin>Virtual Hosts>Context
Create a type and URl you want with Extra Headers: Access-Control-Allow-Origin *
Restart lsws gracefully
Then you can see Response Headers like this:
  1. Accept-Ranges: bytes
  2. Access-Control-Allow-Origin: *
  3. Cache-Control: public, max-age=604800
  4. Connection: Keep-Alive
  5. Content-Length: 0
  6. Content-Type: text/css
  7. Date: Mon, 02 Oct 2017 17:52:37 GMT
  8. Etag: "0-59d265d1-f2e9"
  9. Expires: Mon, 09 Oct 2017 17:52:37 GMT
  10. Last-Modified: Mon, 02 Oct 2017 16:14:09 GMT
  11. Server: LiteSpeed
nice one egg. btw what can i set the url and location as?
 
Top