Re: Re: Problem with cherrypy and "same origin policy"

Musiitwa Edmond <[email protected]> Mon, 22 Jul 2019 10:02:51 +0300
Newsgroups gmane.comp.python.cherrypy
Message-ID <CAEMAD=oknRPB7G-mrXOa8g73a6dV8XWmvq_76517RGUWbLcpeg@mail.gmail.com>
--000000000000ab3ef4058e3faa31
Content-Type: text/plain; charset="UTF-8"

I have had the same problem before when i was developing my backend for a
react app with python flask and the first quick fix i got was
Installing "CORS" browser extension but this is not a permanent solution
since the users of your app would have to run the extension when using the
app
yet the extension messes with some services like YouTube hence making this
solution not so reliable

I din't make any further research on how to fix it in python but am certain
using frameworks like django can be of help and if the worst comes to the
worst,
you can decide to develop your API in JavaScript, very many JS frameworks
have this already cared for,

My personal favorite is ExpressJS but you can check this link for more
alternatives.
https://www.tecmint.com/best-nodejs-frameworks-for-developers/

Hope this helps if you are still stuck


On Sat, Jul 20, 2019 at 9:31 PM Edvin <[email protected]> wrote:

> I had issues with POST methods and it was a combination of cors and OPTION
> headers.
>
> See my post and solution:
> https://groups.google.com/forum/#!topic/cherrypy-users/VKv_KkLJi14
>
> --
> You received this message because you are subscribed to the Google Groups
> "cherrypy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cherrypy-users/bdddf78c-33db-4eab-a4ff-03a9fbc57319%40googlegroups.com
> <https://groups.google.com/d/msgid/cherrypy-users/bdddf78c-33db-4eab-a4ff-03a9fbc57319%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To view this discussion on the web visit https://groups.google.com/d/msgid/cherrypy-users/CAEMAD%3DoknRPB7G-mrXOa8g73a6dV8XWmvq_76517RGUWbLcpeg%40mail.gmail.com.

--000000000000ab3ef4058e3faa31
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have had the same problem before when i was developing m=
y backend for a react app with python flask and the first quick fix i got w=
as<br>Installing &quot;CORS&quot; browser extension but this is not a perma=
nent solution since the users of your app would have to run the extension w=
hen using the app<br><div>yet the extension messes with some services like =
YouTube hence making this solution not so reliable</div><div><br></div><div=
>I din&#39;t make any further research on how to fix it in python but am ce=
rtain using frameworks like django can be of help and if the worst comes to=
 the worst,=C2=A0<br>you can decide to develop your API in JavaScript, very=
 many JS frameworks have this already cared for,<br><br>My personal favorit=
e is ExpressJS but you can check this link for more alternatives.<br><a hre=
f=3D"https://www.tecmint.com/best-nodejs-frameworks-for-developers/">https:=
//www.tecmint.com/best-nodejs-frameworks-for-developers/</a>=C2=A0<br><br>H=
ope this helps if you are still stuck=C2=A0</div><div>=C2=A0<br></div></div=
><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sa=
t, Jul 20, 2019 at 9:31 PM Edvin &lt;<a href=3D"mailto:[email protected]">=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex"><div dir=3D"ltr">I had issues with POST methods and it wa=
s a combination of cors and OPTION headers.=C2=A0<div><br></div><div>See my=
 post and solution:=C2=A0<a href=3D"https://groups.google.com/forum/#!topic=
/cherrypy-users/VKv_KkLJi14" target=3D"_blank">https://groups.google.com/fo=
rum/#!topic/cherrypy-users/VKv_KkLJi14</a></div></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;cherrypy-users&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:cherrypy-users+unsubscribe-/[email protected]" targ=
et=3D"_blank">cherrypy-users+unsubscribe-/[email protected]</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/cherrypy-users/bdddf78c-33db-4eab-a4ff-03a9fbc57319%40googlegrou=
ps.com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">https:=
//groups.google.com/d/msgid/cherrypy-users/bdddf78c-33db-4eab-a4ff-03a9fbc5=
7319%40googlegroups.com</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;cherrypy-users&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:cherrypy-users+unsubscribe-/[email protected]">cher=
rypy-users+unsubscribe-/[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/cherrypy-users/CAEMAD%3DoknRPB7G-mrXOa8g73a6dV8XWmvq_76517RGUWbL=
cpeg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://group=
s.google.com/d/msgid/cherrypy-users/CAEMAD%3DoknRPB7G-mrXOa8g73a6dV8XWmvq_7=
6517RGUWbLcpeg%40mail.gmail.com</a>.<br />

--000000000000ab3ef4058e3faa31--