allowed origins modified to specific url
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
package com.olympus.hermione.security.config;
|
||||
|
||||
|
||||
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.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class CorsConfig implements WebMvcConfigurer {
|
||||
|
||||
@Value("${hermione.fe.url}")
|
||||
private String hermione_frontend_url;
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("*")
|
||||
.allowedOrigins(hermione_frontend_url)
|
||||
.allowedHeaders("*")
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE");
|
||||
}
|
||||
|
||||
@@ -16,4 +16,7 @@ spring.main.allow-circular-references=true
|
||||
|
||||
neo4j.uri=neo4j+s://e17e6f08.databases.neo4j.io:7687
|
||||
neo4j.username=neo4j
|
||||
neo4j.password=8SrSqQ3q6q9PQNWtN9ozqSQfGce4lfh_n6kKz2JIubQ
|
||||
neo4j.password=8SrSqQ3q6q9PQNWtN9ozqSQfGce4lfh_n6kKz2JIubQ
|
||||
|
||||
|
||||
hermione.fe.url="http://hermione.olympusai.live"
|
||||
Reference in New Issue
Block a user