API From the Browser CORS issues - What is the workaround?

rnieves
rnieves EN Basic Posts: 10 Beginner
edited February 3 in Ask the Community

It seems that the meistertask api doesn't support cross origin requests from browsers and we get CORS errors when we try to use the api from a browser (Testing a React App)

Any workarounds for this? We are thinking of creating our own proxy but it seems like an awful lot of work

Best Answer

  • rnieves
    rnieves EN Basic Posts: 10 Beginner
    Answer ✓

    Oh... I can't close posts


    Well for posterity... the issue was a typo on the url and we where hitting the main meistertask website instead of the api endpoint. Hitting the /api endpoint returns the correct headers and can be called from any origin.

Answers

  • Andrew Lapidus
    Andrew Lapidus Admin, MeisterLobster, DE Business Posts: 986 Community Admin

    Hi @rnieves! Sorry to hear you're experiencing this bug. Since @Line Møller Jensen is out on holiday, I've forwarded your question on to our engineering team. I'll keep you updated with more info on this issue as I have it!

    Best,

    Andrew

  • rnieves
    rnieves EN Basic Posts: 10 Beginner

    Hey @Andrew Lapidus no problem. I figured out the issue was the endpoint being called itself. Once we fixed the endpoint we where hitting we where not having any more CORS issues.


    I am closing this post

  • Andrew Lapidus
    Andrew Lapidus Admin, MeisterLobster, DE Business Posts: 986 Community Admin

    Ah nice, glad to hear it's fixed! Thanks also for sharing the solution - have a great holiday!

This discussion has been closed.