Skip to content

Bug : cors error #97

Description

@wonseok-do

한 일

const sendEmailVerifyCode = async () => {
    const url =
      "http://~~~/api/auth/send-email?email=wsdo970@gmail.com";
    const res = await axios.get(url, {
      headers: { "Content-Type": "application/x-www-form-urlencoded" },
    });
    console.log(res);
    return res;
  };

에러 내용

Access to XMLHttpRequest at 'http://~~~/api/auth/send-email?email=wsdo970@gmail.com' from origin
 'http://127.0.0.1:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present
 on the requested resource.

조치 사항

만약 조치한 것이 있거나 구글링한 게 있다면, ...

환경 설정

OS: Windows 10
Node:  v16.15.1 (@unchaptered), v16.13.1(@axisotherwise)
npm : v8.11.0 (@unchaptered), v8.2.2 (@axisotherwise)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug버그 발생

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions