Why Does an API Failed to Be Called Across Domains?
- Ensure that CORS has been enabled for the API.
Go to the API details page, click Edit, and check whether CORS is enabled. If it is not, enable it.
- Check whether an API with the OPTIONS method has been created. Only one such API is required for each API group.
Parameters are as follows:
API Group: The same group to which the API with CORS enabled belongs.
Method: Select OPTIONS.
Protocol: The same protocol used by the API with CORS enabled.
Path: Same as or prefixally matching the request path set for the API with CORS enabled.
Matching: Select Prefix match.
Authentication Mode: None means all users will be granted access. It is not recommended.
CORS: Enable this option.
API Creation FAQs
- Why Can't I Create APIs?
- How Do I Define Response Codes for an API?
- How Do I Specify the Host Port for a VPC Channel (or Load Balance Channel)?
- How Do I Set the Backend Address If I Will Not Use a VPC Channel (or Load Balance Channel)?
- How Can I Configure the Backend Service Address?
- Can I Specify a Private Network Load Balancer Address for the Backend Service?
- Can I Specify the Backend Address as a Subnet IP Address?
- Does APIG Support Multiple Backend Endpoints?
- What Should I Do After Applying for an Independent Domain Name?
- Can I Bind Private Domain Names for API Access?
- Why Does an API Failed to Be Called Across Domains?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore