简体   繁体   English

如何允许特定域访问 drupal 7 API?

[英]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.

相关问题 如何仅在请求来自特定域时才允许htaccess执行 - How to allow htaccess to perform only if the request is from the particular domain 如何只允许一个域访问另一个域中的文件和文件夹 - how to only allow one domain to access files and folders in another domain 如何在drupal 7中仅授予特定用户“添加内容”访问权限? - How to give only “Add content” access permission for a particular users in drupal 7? 允许访问PHP中的特定文件 - Allow access to particular file in PHP 如何在laravel Web应用程序中限制对特定IP地址或域的访问? - How to restrict access to particular IP address or domain in laravel web application? 如何限制对主域的访问并允许附加域 - How to restrict access to main domain and allow addon domains 如何允许特定域访问我在 laravel 中的风格 css - How to allow for specific domain access my style css in laravel API 安全:如何通过域限制访问? - API Security: how to restrict access by domain? Drupal 7.xx-如何检查用户身份并允许访问与Drupal一起运行的自定义Web应用程序? - Drupal 7.xx - how can I check for user auth and allow access to a custom web application running alongside Drupal? PHP-仅允许从一个域访问 - PHP - Allow access from only one domain
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM