Angular 로그인 페이지 적용

Angular 로그인 페이지 적용 010

 

ctx.Response.Header.Set("Access-Control-Allow-Credentials", "true")
ctx.Response.Header.SetBytesV("Access-Control-Allow-Origin", ctx.Request.Peek("Origin"))

-> 넣어봐도 안됨.

 https://developer.mozilla.org/ko/docs/Web/HTTP/CORS

 

https://www.codershood.info/2020/03/14/jwt-authentication-in-golang-tutorial-with-example-api/

https://www.codershood.info/2020/06/23/real-time-private-chatting-app-using-golang-react-and-mongodb-part-1/

-> 이것도 참고

Access to XMLHttpRequest at 'http://localhost:8080/api/users/register' from origin 'http://127.0.0.1:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

https://github.com/rs/cors

https://flaviocopes.com/golang-enable-cors/

-> 이거 두개 참고 해서 해결

 

댓글

댓글 본문
버전 관리
Frank
현재 버전
선택 버전
graphittie 자세히 보기