Cors MVC-Konfigurationsfilterung zur Lösung domänenübergreifender Probleme

Führen Sie einfach die folgende Konfiguration am Filterkonfigurationsort von mvc durch

<mvc:cors>

 
<mvc:mapping path="/api/**"

allowed-origins="http://twgfs.cn, http://twgfs.online"

allowed-methods="GET, PUT,POST"

allowed-headers="header1, header2, header3"

exposed-headers="header1, header2" allow-credentials="true"

max-age="1024" />

 
<mvc:mapping path="/resources/**"

allowed-origins="http://twgfs.cn" />
Veröffentlicht 19 Originalartikel · gewonnen 7 · Aufrufe 6623

Ich denke du magst

Origin blog.csdn.net/William_TWG/article/details/104976180
Empfohlen
Rangfolge