debugs
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 44s

This commit is contained in:
Braydon 2024-09-18 23:52:36 -04:00
parent dc81c85f53
commit 158e42b053
2 changed files with 11 additions and 3 deletions

@ -1,6 +1,8 @@
package cc.pulseapp.api.config;
import jakarta.annotation.PostConstruct;
import lombok.NonNull;
import lombok.extern.log4j.Log4j2;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
@ -9,13 +11,20 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @author Braydon
*/
@Configuration
@Configuration @Log4j2(topic = "App Config")
public class AppConfig {
@PostConstruct
public void init() {
log.info("App Config initialized");
}
@Bean
public WebMvcConfigurer configureCors() {
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(@NonNull CorsRegistry registry) {
log.info("Configuring CORS...");
// Allow all origins to access the API
registry.addMapping("*")
.allowedOrigins("*") // Allow all origins

@ -25,8 +25,7 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
/**
* @author Braydon
*/
@Configuration
@EnableWebSecurity
@Configuration @EnableWebSecurity
@Order(Ordered.HIGHEST_PRECEDENCE)
public class WebSecurityConfig {
/**