Loading

How can I enable CORS in a mock service, without using API Manager?

Data pubblicazione: Jul 22, 2025
Fasi

QUESTION

How can I enable cors in a mock service, without using API Manager?

ANSWER

You can do it in two way :
Either create a proxy and apply CORS Policy in API Manager
  1. Use API Discovery to connect your Implementation to API Manager to apply this CORS Policy.
  2. You have to adjust RAML to return the Header Access-Control-Allow-Origin header for Mock Endpoint.
  3. Apply the HTTP Interceptor configuration in the HTTP connector.

You need to specify in the RAML an OPTIONS method with the appropriate Allow Origin in the response headers.


ADDITIONAL INFORMATION

Furthermore you refer this : Reference1
                                            Reference2
Numero articolo Knowledge

001115566

 
Caricamento
Salesforce Help | Article