nginx解决跨域问题


 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解决跨域问题)