Configure CORS
Cross-origin resource sharing (CORS) lets user agents make cross-domain server requests. In Identity Cloud, you can configure CORS to allow browsers from trusted domains to access Identity Cloud protected resources. For example, you might want a custom web application running on your own domain to get an end-user’s profile information using the Identity Cloud REST API.
By default, CORS is configured to let the ForgeRock SDKs access Identity Cloud.
When trying out the ForgeRock SDKs you run sample applications locally using a DNS alias, such as the preconfigured domain sdkapp.example.com
. You might need to add accepted origin domains to the configuration, depending on the DNS alias you give to your apps.
To update the CORS configuration in Identity Cloud, follow these steps:
-
Log in to your Identity Cloud tenant.
-
At the top right of the screen, click your name.
-
Select Tenant settings > Global Settings.
-
Click Cross-Origin Resource Sharing (CORS).
-
Click ForgeRockSDK.
-
Add any DNS aliases you use for your domains to the Accepted Origins property.
This documentation assumes the following configuration:
Property Values Accepted Origins
https://sdkapp.example.com:8443
https://angular.example.com:8443
https://react.example.com:8443
Accepted Methods
GET
POST
Accepted Headers
accept-api-version
authorization
content-type
if-match
iPlanetDirectoryPro
x-requested-with
Exposed Headers
authorization
content-type
x-requested-with
Enable Caching
True
Max Age
600
Allow Credentials
True
-
Click Save CORS Configuration.