Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUT, DELETE 메서드 CORS 오류 #28

Closed
jho2301 opened this issue Mar 23, 2021 · 1 comment
Closed

PUT, DELETE 메서드 CORS 오류 #28

jho2301 opened this issue Mar 23, 2021 · 1 comment
Assignees
Labels
bug 🐛 Something isn't working

Comments

@jho2301
Copy link

jho2301 commented Mar 23, 2021

🤦🏻 이슈 내용

안녕하세요 브라운
불철주야 고생하십니다.

CORS 이슈로 다시 찾아뵈었습니다. 죄송합니다
전수조사했습니다

  • 역삭제 DELETE /stations/1

  • 역수정 PUT /stations/1

  • 노선 수정 PUT /lines/1

  • 노선 삭제 DELETE /lines/1

  • 구간제거 DELETE /lines/1/sections?stationId=2

위 5개 api에서 cors에러가 발생합니다

나머지 GET, POST API에서는 cors에러가 발생하지 않는 것을 확인했습니다.

image

DELETE /lines

-General 
Request URL: https://www.boorownie.com/lines/1/sections?stationId=2
Request Method: OPTIONS
Status Code: 403 
Remote Address: 3.35.213.149:443
Referrer Policy: strict-origin-when-cross-origin

- Response Headers 
Connection: keep-alive
Date: Tue, 23 Mar 2021 06:34:05 GMT
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers

- Request Header
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6,zh;q=0.5,th;q=0.4,ja;q=0.3,de;q=0.2,fr;q=0.1
Access-Control-Request-Headers: authorization,content-type
Access-Control-Request-Method: DELETE
Connection: keep-alive
Host: www.boorownie.com
Origin: http://localhost:9000
Referer: http://localhost:9000/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36

PUT /lines/1/sections


-General

Request URL: https://www.boorownie.com/lines/1/sections?stationId=2
Request Method: OPTIONS
Status Code: 403 
Remote Address: 3.35.213.149:443
Referrer Policy: strict-origin-when-cross-origin

- Response Headers 

Connection: keep-alive
Date: Tue, 23 Mar 2021 06:37:12 GMT
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers

- Response Header

Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6,zh;q=0.5,th;q=0.4,ja;q=0.3,de;q=0.2,fr;q=0.1
Access-Control-Request-Headers: authorization,content-type
Access-Control-Request-Method: PUT
Connection: keep-alive
Host: www.boorownie.com
Origin: http://localhost:9000
Referer: http://localhost:9000/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36

🕵🏼 기대 결과

DELETE /lines

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Date: Mon, 22 Mar 2021 11:06:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive

PUT

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Date: Mon, 22 Mar 2021 11:06:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive

@Puterism

@Puterism Puterism added the bug 🐛 Something isn't working label Mar 23, 2021
@gracefulBrown
Copy link

#24 이슈와 중복

@jho2301 jho2301 closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants