在配置文件中Apache24/conf/httpd.conf中搜索:
LoadModule headers_module modules/mod_headers.so
去除前面的#号
<VirtualHost *:8000>
DocumentRoot C:
WSGIScriptAlias / C:\users\bruce_fang\desktop\outside_api\conf.wsgi
WSGIScriptReloading On
WSGIPassAuthorization On
LogLevel info
<Directory C:\users\bruce_fang\desktop\outside_api>
AllowOverride AuthConfig FileInfo
Order deny,allow
Allow from all
Require all granted
Header set Access-Control-Allow-Origin * #添加这段配置,*号可以使用具体域名代替
</Directory>
</VirtualHost>
网友评论