how can enable CORS on openlitespeed (admin panel)?

Discussion in 'General OpenLiteSpeed Discussion' started by adz, Sep 30, 2017.

  1. adz

    adz New Member

    can someone please guide me how to properly enable CORS on openlitespeed (ubuntu 14)

    cheers
     
  2. Cold-Egg

    Cold-Egg Administrator

    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
     
    adz likes this.
  3. adz

    adz New Member

    nice one egg. btw what can i set the url and location as?
     
  4. Cold-Egg

    Cold-Egg Administrator

    I simply test with settings:
    Type: Static
    URl: /
    Locations: $SERVER_ROOT/Example/html/

    You can verify with default page: http://Your_Domain/index.html
    Please correct me if I am wrong
     

Share This Page