@Configuration
public class WebConfig implements WebMvcConfigurer{
@Override
public void addCorsMappings(CorsRegistryregistry) {
registry.addMapping("/**")
.allowedOrigins("<http://d9gox7s2vayxc.cloudfront.net>", "<http://gogumacat-frontend.s3-website.ap-northeast-2.amazonaws.com>", "<http://127.0.0.1:5500>") //!!!!!호인님 url 추가
.allowedMethods("*");
}
}
@Component
@Order(Ordered.HIGHEST_PRECEDENCE)
public class CorsFilter implements Filter{
private final static String URL = "<http://127.0.0.1:5500>"; //호인님 url로 변경!!!
...
}
@Configuration
@EnableWebSocketMessageBroker
public class ChatConfig implements WebSocketMessageBrokerConfigurer{
private final static String URL = "<http://127.0.0.1:5500>";
@Override
public void registerStompEndpoints(StompEndpointRegistryregistry) {
registry.addEndpoint("/ws/chat")
.setAllowedOriginPatterns(URL)
.withSockJS();
}
!!s3 access key가 수정되어서 확인 부탁드려요!!
https://www.notion.so/application-properties-c618267fe57a4ce2a20fe3863afb0b6a
# kakao
kakao.restApikey= 1cc8b1fcd1283d896e04d323749f5c38
kakao.callbacUri= <http://127.0.0.1:5500/kakaoCode.html>