Strange behavior when submitting post request in Angular 2

前端 未结 3 1829
春和景丽
春和景丽 2020-12-19 21:36

I realize my title is a bit vague, but here is my situation. I have just started an application in which I am implementing JWT for authentication. I have my server side se

3条回答
  •  有刺的猬
    2020-12-19 22:43

    As mentioned Chrome issues preflighted request. To bypass that you could install this Chrome extension to enable CORS and add *'Allow-Control-Allow-Origin: ' to your headers. That worked for me with django on localhost:8000 and angular2 on localhost:4200.

提交回复
热议问题