跳转到主内容

从ONTAP RESTAPI检索数据时、Web应用程序会生成CORS错误

Views:
7
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core<a>2009748581</a>
Last Updated:

适用场景

  • ONTAP
  • RESTAPI
  • 跨源资源共享(CORS)

问题描述

  • 在使用ONTAP REST API开发Web应用程序期间、所有请求都会失败、并显示与CORS相关的错误(可从浏览器开发人员控制台查看):
Access to XMLHttpRequest at 'http://cluster1.example.com/api/storage/volumes' from origin 'http://localhost' has been blocked by CORS policy
  • 来自其他来源(Postman、Curl、swagger-ui等)的相同请求工作

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.