Enabling Cross Origin Resource Sharing (CORS)

When using optiSLang Web Service from an external origin (for example, embedded in another environment like Ansys Minerva), you must enable the CORS settings.

To do so, edit the following settings in the config.ini file:

  • cors_allow_origin=http://external-svr:8080

    where external-svr is the external server address. You can also add a comma separated list of host addresses, for example:

    cors_allow_origin=http://minerva-svr-A:8080,http://minerva-svr-B:8080,http://minerva-svr-C:8080

  • cors_allow_headers=*

  • cors_allow_credentials=true

  • sameSiteOnly=false

  • parent_origin=*