CORS configuration - AtlasOfLivingAustralia/documentation Wiki


If your LA portal has different subdomains for each LA module you will need to allow the access from one subdomain to other, that is, you will need to configure Cross-origin resource sharing (CORS).

For instance this allows to access to your common branding header/footer and style resources from other subdomains, or to access to you biocache service from other subdomains (for instance from a data hub), et cetera.

CORS configuration

nginx configuration

Since PR 370 you can configure CORS in your nginx vhost proxies configuration via this variable:

nginx_cors_origin_regexp: '^https?:\/\/(localhost|l-a\.site|.*\.l-a\.site|.*\.other-allowed-subdomain\.org)'

This is a PCRE regexp. Test it with some tool like to be sure that works for, or et cetera.

CORS in LA configuration

In LA modules the CORS is configured via:

but for now, the defaults inventory options should work for you.