You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Salesforce的.well-known/openid-configuration启用CORS?

How to Enable CORS for Salesforce's OpenID Configuration Endpoint

Absolutely, you can configure CORS in Salesforce to allow your origin (https://pds-dev) to access the .well-known/openid-configuration endpoint. Here's how to set it up step by step:

  • Log into your Salesforce Setup
  • In the Quick Find search bar at the top, type CORS and select Cross-Origin Resource Sharing (CORS) from the results
  • Click the New button to add a new allowed origin entry
  • Enter your frontend origin URL exactly as it appears in the error: https://pds-dev
  • Save the configuration

After saving, Salesforce will start including the Access-Control-Allow-Origin header for requests from https://pds-dev to the OpenID configuration endpoint (along with other Salesforce API and resource endpoints covered by CORS rules).

A few key notes to ensure this works smoothly:

  • Double-check the origin URL for typos (no trailing slashes, correct protocol and hostname)
  • If you have multiple environments (like staging or production), you’ll need to add each corresponding origin separately
  • Salesforce configuration changes can take a minute or two to propagate, so wait a short time before testing your script again

内容的提问来源于stack exchange,提问作者Radu Negrila

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:15:07