본문 바로가기
Flutter

[Flutter] Chrome 사용 시 nodejs서버에서 XMLHttpRequest 오류 발생

by GGoris 2022. 1. 26.
반응형

https://stackoverflow.com/questions/60191683/xmlhttprequest-error-in-flutter-web-enabling-cors-aws-api-gateway

 

XMLHttpRequest error in flutter web [Enabling CORS AWS API gateway]

Note: It turns out that this had nothing to do with flutter and everything to do with the fact that I had set the API gateway to a Lambda Proxy I am trying to hit an API endpoint from a Flutter web

stackoverflow.com

 

npm i  cors
const cors = require("cors");
app.use(cors());

위 내용을 추가해주면 해결

반응형

댓글