[英]How to allow particular domain to access drupal 7 API?
我创建了一个服务,它提供有关订阅者的信息,但我想允许 2 或 3 个不同的应用程序访问此服务,而不是公众。
Cross-origin resource sharing (CORS) is a mechanism that allows a web page to make XMLHttpRequests to another domain.跨域资源共享 (CORS) 是一种机制,允许网页向另一个域发出 XMLHttpRequest。 Such "cross-domain" requests would otherwise be forbidden by web browsers, per the same origin security policy.
否则,根据同源安全策略,Web 浏览器将禁止此类“跨域”请求。
you can use cors module你可以使用cors 模块
This module provides a configuration page to map domains to paths and add the necessary Access-Control-Allow-Origin header.该模块提供了一个配置页面来将域映射到路径并添加必要的 Access-Control-Allow-Origin 标头。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.