node.js Express CORS Pre-flight
- https://falsy.me/nodejs-express-%ED%86%B5%EC%8B%A0-cors-cors-pre-flight-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0/
- https://github.com/expressjs/cors/issues/135
Failed to load http://127.0.0.1:3000/test: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://127.0.0.1:3001’ is therefore not allowed access.
AJAX가 웹사이트에 GET등을 요청할 때 미리 OPTIONS 메서드를 사용해 웹사이트에서 사용가능한지 묻기 때문에 GET뿐만 아닌, OPTIONS도 허용해야함