在Windows 8上启用带wamp的CORS [英] Enable CORS with wamp on windows 8
问题描述
我有一个跨域请求问题与我正在做的应用程序。我真的花了几个小时寻找如何使用wamp(localhost)启用CORS的解决方案,但没有什么工作对我来说。
我在Windows 8.1上有Apache 2.4.9。我已启用标头,我尝试放置
标题添加Access-Control-Allow-Origin*
标题添加访问控制允许方法:GET,POST,OPTIONS,DELETE,PUT
在.htaccess和在http.conf以及无数的其他变体。
如果任何人有一个解决方案,将是真棒!
$ b $使用wampmanager菜单执行以下操作: -
wampmanager - > Apache - > Apache模块 - > headers_module
确认这是勾选的,如果没有,点击该菜单项并等待几秒钟WampServer重新启动Apache。
I have a cross domain request problem with an application I'm doing. I really spent hours looking for a solution on how to enable CORS with wamp (localhost) but nothing worked for me.
I have Apache 2.4.9 on Windows 8.1. I have enable the headers, I tried to put
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
in a .htaccess and in the http.conf as well as countless other variations.
If anyone had a solution that'd be awesome!
You must also activate the Apache Headers module.
Using the wampmanager menus do this :-
wampmanager -> Apache -> Apache modules -> headers_module
Make sure this is ticked, if its not, click that menu item and wait a few seconds while WampServer restarts Apache.
这篇关于在Windows 8上启用带wamp的CORS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!