Spring Cloud - Zuul Proxy is producing a No 'Access-Control-Allow-Origin' ajax response

后端 未结 6 587
别跟我提以往
别跟我提以往 2021-02-04 05:28

Startup Appplication:

@SpringBootApplication
@EnableZuulProxy
public class ZuulServer {

     public static void main(String[] args) {
         new SpringApplica         


        
6条回答
  •  情歌与酒
    2021-02-04 06:02

    That's just the browser telling you that you breached its common origin policy (see Wikipedia entry and a huge amount of material on the internet, none of which is really relevant to the tags you added). You can either teach the browser that it is OK to load resources from a different address by servicing the CORS pre-flight checks (e.g. in a Filter) or load the HTML through the proxy (hint: the latter is much easier and less error prone).

提交回复
热议问题