SEB CORS issue #472
-
|
Hi, I am trying to integrate SEB with our custom LMS. I made good progress with generating request/config hash, verification on the server side etc. I am facing a peculiar issue. Our server is Spring/Java and the client is Angular. So in dev, we connect from http://localhost:4200 (Client hosted using ng serve) to http://localhost:8080 (Dev API server). So this is a CORS request since the ports are different. And we have OPTIONS before GET/POST and we get the SEB headers and it is working. However, if I make the Angular client (http://localhost:4200) connect to a different server (server IP and port are different), SEB is not setting both the headers (request and config hash) and the verification fails. Any idea why this could be happening? Any suggestions? Thanks for your help. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
There were similar reports (especially regarding CORS), see #46, #66 or #84. If this should be the same issue here, then we'd recommend to use the new JavaScript API to query the BEK and/or CK. |
Beta Was this translation helpful? Give feedback.
-
|
ok. Thanks! Will try that.. How does the Javascript SDK work with XMLHttpRequests? I did not see an API to get the request hash given an API I am about to invoke. request hash generated based on the current page URL will not work for XMLHttpRequests.. right? How can I handle this scenario? |
Beta Was this translation helpful? Give feedback.
There were similar reports (especially regarding CORS), see #46, #66 or #84. If this should be the same issue here, then we'd recommend to use the new JavaScript API to query the BEK and/or CK.