Home > front end >  In added @ CrossOrigin annotations still cross-domain errors
In added @ CrossOrigin annotations still cross-domain errors

Time:09-18

After add the cross-domain notes still offer cross-domain error:


Then change the configuration class or not:

CodePudding user response:

With http://, wrong not

CodePudding user response:

reference 1st floor jio can reply:
with http://, the instructions are not wrong


I have solved, because I have shiro exist so will lead to annotate the configuration class fail, because before the cross-domain request there will be a hook to determine whether cross domain, in the case of no cross-domain would begin the real request, but because of the presence of shiro, lead to hook into the first shiro, because shiro is a wrapper of interceptors, so will always cross domain, so you need to write a blocker to deal with the hook, and then register into shiroconfig, so can solve the problem of integrated access of cross-domain, thank bosses counsel, thank you
  • Related