로컬환경 결제시 토스 successurl 보안에러
로컬 환경(http)은 아래와같습니다
프론트주소 : localhost:3001
서버주소 : localhost:3000
저는 successurl을 프론트서버 주소가 아닌 서버 엔드포인트로 지정 > 엔드포인트에서 최종적으로 redirect하는방식으로 구현을했는데
successurl이 서버의 api 엔드포인트로 도달을 못합니다.
successUrl:
보안에러는 아래처럼나옵니다.
Unsafe attempt to initiate navigation for frame with origin 'http://localhost:3001' from frame with URL 'https://payment-gateway-sandbox.tosspayments.com/pc/direct?token=78fc63197cfb4d008e00b1c905815eb1168a953a65f84e129fd8765857347ddb&authType=KAKAOPAY&cardCode=KAKAOPAY>id=a2509148sMEkjQgsX5H44SqD4XgkkcUqxkL4Ggv'. The frame attempting navigation is targeting its top-level window, but is neither same-origin with its target nor has it received a user gesture
실제 서버환경은 (https) 로 프론트/서버 도메인은 같고 nginx로 포트만 3001,3000 사용합니다.
프론트주소 : localhost:3001
서버주소 : localhost:3000
저는 successurl을 프론트서버 주소가 아닌 서버 엔드포인트로 지정 > 엔드포인트에서 최종적으로 redirect하는방식으로 구현을했는데
successurl이 서버의 api 엔드포인트로 도달을 못합니다.
successUrl:
${process.env.NEXT_PUBLIC_API_URL}/api엔드포인트보안에러는 아래처럼나옵니다.
Unsafe attempt to initiate navigation for frame with origin 'http://localhost:3001' from frame with URL 'https://payment-gateway-sandbox.tosspayments.com/pc/direct?token=78fc63197cfb4d008e00b1c905815eb1168a953a65f84e129fd8765857347ddb&authType=KAKAOPAY&cardCode=KAKAOPAY>id=a2509148sMEkjQgsX5H44SqD4XgkkcUqxkL4Ggv'. The frame attempting navigation is targeting its top-level window, but is neither same-origin with its target nor has it received a user gesture
실제 서버환경은 (https) 로 프론트/서버 도메인은 같고 nginx로 포트만 3001,3000 사용합니다.
