Saltar al contenido principal

Búsqueda

Búsqueda

Web Service integration - CORS

Comentarios

5 comentarios

  • Avatar
    pthane

    Hi Gavin,

    I think you maybe better raising this with the Seagull Tech Support rather than post the query on here.

    Pete 

    0
  • Avatar
    Gene Henson

    Gavin,

    Have you tried setting the CORS header in Integration Builder? You can set this in the "Response" section of your integration:

    If you're sending a GET, HEAD, or POST request, you may also be able to prevent the CORS preflight it by changing the content-type of your request to one of these:

    • application/x-www-form-urlencoded
    • multipart/form-data
    • text/plain

    There's more information about what causes this and modern CORS behavior here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS.

     

    0
  • Avatar
    Thomas Hagan

    If you set the content-type to application/x-www-form-urlencoded, this will disable your browser from making the OPTIONS pre-flight requests since it is not required for this format. Normally, however you would need to encode your payload into the CURL. I tried that and found the bartender service would not accept the payload in that format. I then tried sending the payload as a JSON body and it worked fine. No comments regarding HTML5 compliance, but it works.

    0
  • Avatar
    Bradley King

    Still not really a solution. With the latest version of Integration Builder CORS is still not supported properly. The product needs to be able to respond to OPTIONS requests with the access-control-allow-origin header, as the original poster on this thread correctly states. Right now the only way to support this properly is to put nginx or another proxy in front of it. You also should really support HTTPS. All HTTPS sites (aka ALL modern web sites) making web integration calls from the browser are going to give errors.

    0
  • Avatar
    Jacob Smith

    Bumping this one, in case there's some new development (that I can't see).

    0

Iniciar sesión para dejar un comentario.