-
Notifications
You must be signed in to change notification settings - Fork 2
CORS configuration
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.
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 https://www.regextester.com/ to be sure that works for https://l-a.site
, https://records.l-a.site
or https://hub.other-allowed-subdomain.org
et cetera.
In LA modules the CORS is configured via:
- https://github.com/davidtinker/grails-cors
- or other modules like spatial uses https://github.com/AtlasOfLivingAustralia/ala-cors-plugin
but for now, the defaults inventory options should work for you.
Index
- Wiki home
- Community
- Getting Started
- Support
- Portals in production
- ALA modules
- Demonstration portal
- Data management in ALA Architecture
- DataHub
- Customization
- Internationalization (i18n)
- Administration system
- Contribution to main project
- Study case