html5 - How should the Access-Control-Allow-Origin of the CORS mechanism be set?
高洛峰
高洛峰 2017-06-29 10:10:17
0
3
922

Using cors across domains requires the target server to add your host in Access-Control-Allow-Origin or set Access-Control-Allow-Origin to *. If the target server is a third party, it seems unrealistic for him to add me. If it is a public API, it cannot be added. In this case, is it set to *? If set to * to accept requests from any domain name, will there be any problem with XSS attacks?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
为情所困

Public APIs such as Baidu API require a secret key to adjust the interface. To adjust the interface of a third-party server, you need to apply for whitelisting. . .

世界只因有你

For security considerations, most open interfaces require signature verification. You can take a look at Alibaba’s open interface https://market.aliyun.com/data

滿天的星座

Pay attention, good question

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!