美文网首页
nginx解决跨域问题

nginx解决跨域问题

作者: 小知大知 | 来源:发表于2018-06-08 12:32 被阅读16次
    
     server {
            listen       80;
            server_name  192.168.0.106;
    
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
            location / {
                proxy_pass http://192.168.0.103:8080/hsell/login/home;
            }
    
            location /hsell/  {
                 add_header 'Access-Control-Allow-Origin' '*';
                 proxy_pass http://192.168.0.103:8081/hsell/;
            }
    
    

    相关文章

      网友评论

          本文标题:nginx解决跨域问题

          本文链接:https://www.haomeiwen.com/subject/ggzosftx.html