KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to enable CORS in v18 R4 for all domains
PRODUCT: 4D | VERSION: 18 R | PLATFORM: Mac & Win
Published On: November 9, 2020

When developing a web application with cross-domain requests, sometimes it is necessary to enable cross-origin resource sharing (CORS). 4D databases will usually restrict CORS by default. Before v18 R4, enabling CORS would have been done via HTTP request headers. Now, developers can simply configure particular web options in the database settings to enable CORS. To enable CORS in v18 R4, go to the Options (II) tab under Web settings, and find the box labeled "CORS Settings". Toggle the "Enable CORS" option on, then under the list box click the plus (+) button to add a row for a domain. Edit the first column to an asterisk (*) symbol to allow CORS for all domains.