If you want to add custom response headers to your OpenLiteSpeed server, you can do this easily with RunCloud.

Here are the steps to follow:

  1. Log in to your RunCloud dashboard and select the application that you want to add custom response headers to.
  2. Go to the LiteSpeed Settings tab. This will open a text editor where you can edit the OpenLiteSpeed configuration file directly.
  3. In the configuration file, you can add new config directives to specify the custom response headers that you want to send.
  4. For each custom response header, create a new context, and use the extraHeaders directive to provide the header name and value.

    For example:
context / {
    extraHeaders    my-custom-header value-of-my-header
  1. You can add as many custom response headers as you want, with each on a new line. Make sure to follow the syntax and indentation rules of the configuration file.
  2. Save and update the configuration file. RunCloud will apply the changes to your OpenLiteSpeed server automatically.
  1. To verify that your custom response headers are working, you can use your browser’s Developer Tools and check the Network tab.

    There, you can see the response headers that your server sends for each request.
In the above example, we can see the a custom header with the name of my-custom-header and the value of value-of-my-header.

This is just one example of how you can add any header that you want to your OpenLiteSpeed server using RunCloud. You can also add other headers such as CSP (Content Security Policy) or Permissions Policy to enhance the security and functionality of your web application.

To add any of these headers, you just need to follow the steps described above – but change the header name and value according to your needs.

You can also configure CORS (Cross-Origin Resource Sharing) by adding the relevant headers, such as Access-Control-Allow-Origin or Cross-Origin-Resource-Policy.

To learn more about how to configure CORS using RunCloud, you can refer to How to Enable Cross-Origin Resource Sharing.

To learn more about HTTP response headers and their usage, you can refer to these resources: