Skip to content

이벤트 생성 시 CORS 정책 위반으로 인한 API 요청 실패 #106

@colswap

Description

@colswap
  1. Description 이벤트 생성 폼에서 제출 버튼 클릭 시, 백엔드 API 서버(server.snutoto.o-r.kr)의 CORS 설정 미비로 인해 요청이 차단됩니다. 이로 인해 사용자가 이벤트를 정상적으로 생성할 수 없습니다. 로그인은 이미 한 상태인데, failed to fetch가 뜨면서 제대로 요청이 되지 않았습니다. 전체 및 각 항목 별로 총 3개 이미지 올렸습니다

  2. Environment
    Origin: https://d55bqrug1d7zs.cloudfront.net
    Target API: https://server.snutoto.o-r.kr/api/events
    Browser: CHROME

Image 하단에 Failed to fetch 메시지 노출 및 콘솔에 CORS 에러 출력
  1. Console Log

Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was receivedUnderstand this error
(index):1 Access to fetch at 'https://server.snutoto.o-r.kr/api/events' from origin 'https://d55bqrug1d7zs.cloudfront.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
server.snutoto.o-r.kr/api/events:1 Failed to load resource: net::ERR_FAILEDUnderstand this error
(index):1 Access to fetch at 'https://server.snutoto.o-r.kr/api/events' from origin 'https://d55bqrug1d7zs.cloudfront.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
server.snutoto.o-r.kr/api/events:1 Failed to load resource: net::ERR_FAILEDUnderstand this error
(index):1 Access to fetch at 'https://server.snutoto.o-r.kr/api/events' from origin 'https://d55bqrug1d7zs.cloudfront.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
server.snutoto.o-r.kr/api/events:1 Failed to load resource: net::ERR_FAILEDUnderstand this error
(index):1 Access to fetch at 'https://server.snutoto.o-r.kr/api/events' from origin 'https://d55bqrug1d7zs.cloudfront.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
server.snutoto.o-r.kr/api/events:1 Failed to load resource: net::ERR_FAILED

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions