yes?
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 59s
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 59s
This commit is contained in:
parent
f35316472c
commit
b6e97d47a2
@ -20,7 +20,7 @@ WORKDIR /home/container
|
||||
COPY --from=builder /home/container/target/API.jar .
|
||||
|
||||
# We're running in production
|
||||
ENV APP_ENV "production"
|
||||
ENV APP_ENV="production"
|
||||
|
||||
# Run the jar file
|
||||
CMD java -jar API.jar -Djava.awt.headless=true
|
@ -36,6 +36,11 @@ public class PulseAPI {
|
||||
SpringApplication.run(PulseAPI.class, args); // Start the app
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures CORS for the API.
|
||||
*
|
||||
* @return the WebMvc config
|
||||
*/
|
||||
@Bean
|
||||
public WebMvcConfigurer corsConfigurer() {
|
||||
return new WebMvcConfigurer() {
|
||||
@ -43,11 +48,7 @@ public class PulseAPI {
|
||||
public void addCorsMappings(@NonNull CorsRegistry registry) {
|
||||
// Allow all origins to access the API
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("*") // Allow all origins
|
||||
.allowedMethods("*") // Allow all methods
|
||||
.allowedHeaders("*"); // Allow all headers
|
||||
// registry.addMapping("/*")
|
||||
// .allowedOrigins("http://localhost:9000");
|
||||
.allowedOrigins("*"); // Allow all origins
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user