nginx解决跨域问题

2018-06-08  本文已影响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/;
        }

上一篇下一篇

猜你喜欢

热点阅读