接口代理nginx配置

        location /api/ {
            proxy_set_header Host api.shenjian.io;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Referer http://api.shenjian.io/;
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, X-Csrf-Token";
            add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
            proxy_pass https://api.shenjian.io/;
        }

 

相关文章:

  • 2021-09-01
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-07-03
  • 2021-11-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案