Miscellaneous Configurations

CSP Overrides

Port Configuration

Shorter App URLs

Note: Stop the web server prior to making your edits, and start it after.

CSP Overrides

When the file is in place, but can’t be loaded due to security restrictions of Content Security Policy, you can provide the Jetty rewrite rules - for instance, for the Swagger (OpenAPI) definitions.

Provide the configurations in the file named jetty-rewrite-rules.xml that resides in the following directory:

/opt/Querix/Lycia/jetty/etc/
C:\Program Files\Querix\Lycia\jetty\etc\

For example:

<Call name="addRule">

<Arg>

<New class="org.eclipse.jetty.rewrite.handler.HeaderRegexRule">

<Set name="regex">^(?!/LyciaWeb/FormBuilder)(?!/LyciaWeb/esapi)(?!/LyciaWeb/res)(?!/LyciaWeb/tmp).*$</Set>

<Set name="headerName">Content-Security-Policy</Set>

<Set name="headerValue">default-src 'self';</Set>

</New>

</Arg>

</Call>

Now this rule dismisses the Content Security Policy header for:

 

Return to top

Port Configuration

You may need to change the default Lycia ports for http (9090) and https (9443). To do that, provide the configuration by defining new ports in

/opt/Querix/Lycia/jetty/start.ini

or

C:\Program Files\Querix\Lycia\jetty\start.ini.

For example:

jetty.http.port=5555

Restart Jetty after this action.

After that, the URL for running Lycia applications will look as follows:

http://localhost:5555

 

You also may get rid of port definition in the URL by defining the default HTTP port:

jetty.http.port=80

In that case, the URL will have the following format:

http://localhost

 

To define custom port for HTTPS scheme, change following parameter in start.ini. For example:

jetty.ssl.port=7777

To use HTTPS URL without a port definition (https://localhost), add the line jetty.ssl.port=443 to

/opt/Querix/Lycia/jetty/start.ini

or

C:\Program Files\Querix\Lycia\jetty\start.ini:

 

Return to top

Shorter App URLs

To reduce the URL size for application launch from

http://localhost:9090/LyciaWeb/run/default/my_app

to

http://localhost:9090

add the following rule to the jetty-rewrite-rules.xml file:

<Configure id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">

<Call name="addRule">

<Arg>

<New class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule">

<Set name="regex">^/$</Set>

<Set name="replacement">/LyciaWeb/run/default/my_app</Set>

</New>

</Arg>

</Call>

</Configure>

 

Return to top

 

Contact Us

Privacy Policy

Copyright © 2026 Querix, (UK) Ltd.