drupal / cors
在Drupal 8中启用cors选项
dev-master
2015-02-09 07:32 UTC
Requires
- asm89/stack-cors: 0.2.1
- composer/installers: ~1.0
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的情况下会被浏览器禁止,这是根据同源安全策略。