Deno Oak Disable Cors

前端 未结 4 795
陌清茗
陌清茗 2021-01-15 11:40

I am trying to \'connect\' my small React JS app with my Deno API backend on my local environment with fetch().

   con         


        
4条回答
  •  感动是毒
    2021-01-15 11:57

    placeapp.use(oakCors()) before your routes like this:

    app.use(oakCors())
    app.use(route.routes())
    

    this is allow all CORS before to manage the routes

提交回复
热议问题