Server Configuration via Environment Variables

  • WA_CORS_ORIGINS defines what sources are allowed to make requests. The's no default value. Please bear in mind that if you don't set this value, the CORS headers will be switched off and no such headers will be added within the Web SDK container.

  • WA_CORS_METHODS(optional) – HTTP methods allowed to use. If the variable is not set, it gets the default value, which is 'GET, POST, OPTIONS'. If the variable is not used, any method is accepted.

  • WA_CORS_HEADERS(optional) – HTTP headers allowed to use. If the variable is not set, it gets the default value which is 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'. If the variable is not used, any header is accepted.

An example of using environment variables for server configuration:

docker run -d -p 80:80 \
-e WA_CORS_ORIGINS='*' \
-e WA_CORS_METHODS='GET, POST, OPTIONS' \
-e WA_CORS_HEADERS='DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' \
ozforensics/oz-webliveness:{tag}

Last updated