-
问题描述:当前本地项目中需要嵌套第三方系统的某个页面,当前已通过VPN连接到第三方,但是依然存在跨域问题,提示信息如下:
当前嵌入页面的写法:
<iframe id="winIframe" width="100%" src="http://10.21.132.37:8080/decision/view/report?viewlet=zichankehu_test%252Ftax.cpt&ref_t=design&op=view&ref_c=df262129-db4a-4f3c-98b7-9f4cdd6cba5f" height="1000" style="border: 0; overflow-x: hidden;" ></iframe>
-
问题描述:当前App某个功能,页面由我方构建,接口采用第三方,刚开始采用IP方式请求接口,存在跨域问题,后续跟后端商榷采用域名访问,当前依然存在连接问题,如图所示:
当前请求:http://test.shmsp.com:18070/oauth/token?grant_type=password&username=1661795336&password=1 代码实现
getToken(data?: any) { return this.httpPost("http://test.shmsp.com:18070/oauth/token?grant_type=password&username=1661795336&password=1", data, { headers: { Accept: "application/json, text/plain, */*", "Content-Type": "application/json; charset=utf-8", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "POST, GET, OPTIONS, DELETE", authorization: "Basic d2lzZG9tY2FudGVlbndhcDo0NWJiODk5YjAzOTM0Mjc1YjY5ODYzYzZlYWMwNmYyNg==", mode: "cors" } }); }
遇到的跨域问题
最新推荐文章于 2024-06-14 10:23:44 发布