Skip to content

Commit

Permalink
[Feat] 정적 리소스 cors 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hen715 committed Jan 23, 2025
1 parent e9f8ec7 commit 995aae2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

Expand All @@ -25,5 +26,10 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
.addResolver(customResourceHttpRequestHandler);
}


@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/images/**")
.allowedOrigins("*")
.allowedMethods("*");
}
}

0 comments on commit 995aae2

Please sign in to comment.