Stage 5 3. Micro Services [online] studies _day02 CMS front-end development _22-CMS front page query development -Api call - to solve cross-domain

Click the Query button page, an error. Cross-domain issues.





Front-end port is a service port address is 31001 11000 requests backend appear across domains



Begin to solve cross-domain

The front of the ported address is replaced by a variable

Only the beginning / api / cms on the forward end of the service port 31001


to / api replaced with a null string

test

Click to query the database can access the




latter will to solve cross-domain problem by nginx proxy




 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/11563930.html