当前位置:网站首页>What are the solutions across domains?

What are the solutions across domains?

2022-06-12 02:31:00 Bamboo shrimp

Cross domain is a common scenario for front-end request interfaces , How to solve cross domain ? And what are the most common methods ?

  1. CORS
    cors You need to configure a cross domain configuration on the server ,
    After configuration, there is one more request header Access-Control-Allow-Origin, If the browser passes the judgment, it will allow cross domain
  2. JSONP
    Actually by script The characteristics of the label ( No cross domain restrictions ) To achieve cross domain , Server side cooperation is also required , And can only use get Method
  3. Reverse proxy
    It means using a proxy server to proxy the server
  4. Forward agency
    It means to use a proxy server to proxy the client , Generally, the browser is used as the proxy server
原网站

版权声明
本文为[Bamboo shrimp]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120228091861.html