简体   繁体   中英

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. Such "cross-domain" requests would otherwise be forbidden by web browsers, per the same origin security policy.

you can use cors module

This module provides a configuration page to map domains to paths and add the necessary Access-Control-Allow-Origin header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM