How to Overcome Cross-domain Issues for Ajax Calls to CAS-protected Resources?

前端 未结 2 1016
广开言路
广开言路 2021-01-12 06:54

What are potential solutions to a redirection problem that occurs when trying to make AJAX calls to a CAS-protected, SSL-encrypted resource located on a server different fro

2条回答
  •  一整个雨季
    2021-01-12 07:29

    I have 2 suggestions:

    • can you set up a proxy script on the same domain as the one that holds the JS code? That way the proxy script would query the CAS and return desired results
    • can you enable JSONP? this type of request is not limited by the security policy (but then anyone could use the service)

提交回复
热议问题