Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
akselsf committed Oct 20, 2024
1 parent 8bc0c34 commit 7f75add
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ FROM openjdk:17
EXPOSE 8080
COPY --from=build /home/gradle/src/build/libs/autobank-image.jar /app/
RUN bash -c 'touch /app/autobank-image.jar'

ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-Djava.security.egd=file:/dev/./urandom","-jar","/app/autobank-image.jar"]

3 changes: 2 additions & 1 deletion src/main/kotlin/com/example/autobank/security/WebConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ class WebConfig : WebMvcConfigurer {

override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:3000") // Replace with your frontend URL
.allowedOrigins("http://localhost:3000", "https://autobank-frontend.vercel.app") // Add your frontend URL here e.
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
.allowedHeaders("*")
.allowCredentials(true)
.maxAge(3600)

}
}

0 comments on commit 7f75add

Please sign in to comment.