cors changes applied & new-gw
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -34,5 +34,5 @@ build/
|
|||||||
|
|
||||||
##changes in filepath before deploy
|
##changes in filepath before deploy
|
||||||
#src/main/java/com/olympus/apollo/services/StorageProperties.java
|
#src/main/java/com/olympus/apollo/services/StorageProperties.java
|
||||||
#src/main/resources/application.properties
|
#src/main/resources/application.yml
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.olympus.apollo.config;
|
package com.olympus.apollo.config;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
||||||
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
|
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
|
||||||
@@ -10,10 +11,13 @@ import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerCo
|
|||||||
@EnableWebSocketMessageBroker
|
@EnableWebSocketMessageBroker
|
||||||
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||||
|
|
||||||
|
@Value("${apollo.fe.url}")
|
||||||
|
private String apollo_frontend_url;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||||
registry.addEndpoint("/ws/endpoint")
|
registry.addEndpoint("/ws/endpoint")
|
||||||
.setAllowedOrigins("http://olympus-api-gateway.olympusai.live")
|
.setAllowedOrigins(apollo_frontend_url)
|
||||||
.withSockJS();
|
.withSockJS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
package com.olympus.apollo.security.config;
|
package com.olympus.apollo.security.config;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class CorsConfig implements WebMvcConfigurer {
|
public class CorsConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
@Value("${apollo.fe.url}")
|
||||||
|
private String apollo_frontend_url;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
registry.addMapping("/**")
|
registry.addMapping("/**")
|
||||||
.allowedOrigins("*")
|
.allowedOrigins(apollo_frontend_url)
|
||||||
.allowedHeaders("*")
|
.allowedHeaders("*")
|
||||||
.allowedMethods("GET", "POST", "PUT", "DELETE");
|
.allowedMethods("GET", "POST", "PUT", "DELETE","OPTIONS");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
spring.application.name=apollo
|
|
||||||
server.port=8082
|
|
||||||
#spring.jpa.show-sql=true
|
|
||||||
#spring.jpa.hibernate.ddl-auto=update
|
|
||||||
#spring.datasource.url=jdbc:postgresql://localhost:5432/olympus
|
|
||||||
#spring.datasource.username=andreaterzani
|
|
||||||
#spring.datasource.password=26111979
|
|
||||||
#spring.datasource.driver-class-name=org.postgresql.Driver
|
|
||||||
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
|
||||||
|
|
||||||
|
|
||||||
spring.ai.vectorstore.mongodb.uri=
|
|
||||||
|
|
||||||
spring.data.mongodb.uri=
|
|
||||||
spring.data.mongodb.database=
|
|
||||||
spring.data.mongodb.username=
|
|
||||||
spring.data.mongodb.password=
|
|
||||||
|
|
||||||
spring.ai.vectorstore.mongodb.indexName=vector_index
|
|
||||||
spring.ai.vectorstore.mongodb.collection-name=vector_store
|
|
||||||
spring.ai.vectorstore.mongodb.initialize-schema=false
|
|
||||||
|
|
||||||
# API key if needed, e.g. OpenAI
|
|
||||||
spring.ai.openai.api-key=
|
|
||||||
|
|
||||||
#size filter
|
|
||||||
spring.servlet.multipart.max-file-size=5000000MB
|
|
||||||
spring.servlet.multipart.max-request-size=500000MB
|
|
||||||
|
|
||||||
#path to the repository
|
|
||||||
ingestion.repository.basepath=C:\\Users\\andrea.terzani\\dev\\Olympus
|
|
||||||
|
|
||||||
gitlab.token=
|
|
||||||
#gitlab.path=C:\\repos\\olympus_ai\\gitClone
|
|
||||||
gitlab.path=/mnt/apollo_storage/repository
|
|
||||||
49
src/main/resources/application.yml
Normal file
49
src/main/resources/application.yml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
server:
|
||||||
|
port: 8082
|
||||||
|
|
||||||
|
apollo:
|
||||||
|
fe:
|
||||||
|
url: "http://localhost:5173"
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: apollo
|
||||||
|
ai:
|
||||||
|
openai:
|
||||||
|
api-key:
|
||||||
|
vectorstore:
|
||||||
|
mongodb:
|
||||||
|
uri:
|
||||||
|
indexName: vector_index
|
||||||
|
collection-name: vector_store
|
||||||
|
initialize-schema: false
|
||||||
|
data:
|
||||||
|
mongodb:
|
||||||
|
uri:
|
||||||
|
database:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 5000000MB
|
||||||
|
max-request-size: 500000MB
|
||||||
|
|
||||||
|
#path to the repository
|
||||||
|
ingestion:
|
||||||
|
repository:
|
||||||
|
basepath: C:\\Users\\andrea.terzani\\dev\\Olympus
|
||||||
|
gitlab:
|
||||||
|
token:
|
||||||
|
path: /mnt/apollo_storage/repository #C:\\repos\\olympus_ai\\gitClone
|
||||||
|
|
||||||
|
|
||||||
|
#spring.jpa.show-sql=true
|
||||||
|
#spring.jpa.hibernate.ddl-auto=update
|
||||||
|
#spring.datasource.url=jdbc:postgresql://localhost:5432/olympus
|
||||||
|
#spring.datasource.username=andreaterzani
|
||||||
|
#spring.datasource.password=26111979
|
||||||
|
#spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
root: INFO
|
||||||
Reference in New Issue
Block a user