drupal/cors

在Drupal 8中启用cors选项

安装: 153

依赖项: 3

建议者: 0

安全性: 0

星标: 15

关注者: 4

分支: 7

开放问题: 2

类型:drupal-module

dev-master 2015-02-09 07:32 UTC

This package is auto-updated.

Last update: 2024-08-24 04:39:47 UTC


README

Drupal 8 CORS

感谢Drupal 8中的问题 (#2303673)[https://github.com/drupal/drupal/commit/5ef912e9659131fd31d1522e3216d37323a0c047],现在我们有一个新的强大组件,(StackPHP)[http://stackphp.com] 是HttpKernel类的一个中间件,这个中间件提供了一个装饰器,可以拦截接触Drupal核心后的请求。

如何使用

此模块不提供UI,只需要您开启。

安装

$ cd modules/
$ git clone git@github.com:dmouse/cors-drupal8.git cors
$ drush en cors

使用应用启用跨域资源共享,以使http-{foundation,kernel}中间件。

跨域资源共享(CORS)是一种机制,允许网页向另一个域名发出XMLHttpRequest请求。这种“跨域”请求在没有CORS的情况下会被浏览器禁止,这是根据同源安全策略。