Signed-off-by: MiniDigger <admin@minidigger.me>
This commit is contained in:
MiniDigger 2021-04-05 19:45:48 +02:00
parent fc1ec2b768
commit cc7a94a1be

View File

@ -6,6 +6,7 @@ import com.fasterxml.jackson.module.paramnames.ParameterNamesAnnotationIntrospec
import freemarker.core.HTMLOutputFormat;
import freemarker.template.TemplateException;
import io.papermc.hangar.config.hangar.HangarConfig;
import io.papermc.hangar.config.hangar.HangarSecurityConfig;
import io.papermc.hangar.config.jackson.HangarAnnotationIntrospector;
import io.papermc.hangar.securityold.UserLockExceptionResolver;
import no.api.freemarker.java8.Java8ObjectWrapper;
@ -67,7 +68,7 @@ public class WebConfig extends WebMvcConfigurationSupport {
@Override
protected void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/internal/**").allowedOrigins(hangarConfig.isDev() ? "http://localhost:3000" : "https://hangar.minidigger.me");
registry.addMapping("/api/internal/**").allowedOrigins(hangarConfig.isDev() ? "http://localhost:3000" : hangarConfig.getBaseUrl());
}
// TODO remove after freemarker is gone