0

i deployed a webservice in my (tomcat 9 Jax-rs jersey) i configured one swagger test when i use an http connection http://localhost:8080/myws it's work fine but same ws deployed in remote server in https://remoteserver/myws i got

Failed to fetch. Possible Reasons:

. CORS
. Network Failure
. URL scheme must be "http" or "https" for CORS request.

when i tried with curl command line it's work fine

do you have an idea please

Joek
  • 1
  • 1
  • What is the error message on the Console tab in the browser dev tools? – Helen Feb 17 '23 at 11:59
  • Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxx/evaluate. (Reason: CORS preflight response did not succeed). Status code: 403. – Joek Feb 17 '23 at 13:30
  • when i tested with reqbin.com site it's work fine – Joek Feb 17 '23 at 13:32
  • Review your CORS and auth configs. Preflight requests should not require authentication and should return status 200 instead of 403. – Helen Feb 17 '23 at 14:09
  • i used the example here Jersey 2.X https://stackoverflow.com/a/28067653 but us i said i d'ont understand whey it's work with curl and java client and not with swagger ui i added some debug log but i think the request was filtred no trace for swagger request in server side – Joek Feb 17 '23 at 14:41

0 Answers0