add feature with claude code #34
@@ -8,13 +8,16 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
@Configuration
|
||||
public class CorsConfig implements WebMvcConfigurer {
|
||||
|
||||
@Value("${vaessl.frontend-url}")
|
||||
private String frontendUrl;
|
||||
@Value("${vaessl.frontend-local-url}")
|
||||
private String frontendLocalUrl;
|
||||
|
||||
@Value("${vaessl.frontend-public-url}")
|
||||
private String frontendPublicUrl;
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins(frontendUrl, "http://192.168.1.208:5173", "https://5173.code-server.kasuns.website")
|
||||
.allowedOrigins(frontendLocalUrl, frontendPublicUrl)
|
||||
.allowedMethods("GET", "POST", "DELETE", "OPTIONS")
|
||||
.allowedHeaders("Content-Type", "Accept")
|
||||
.allowCredentials(true);
|
||||
|
||||
@@ -5,8 +5,13 @@
|
||||
"description": "A description for 'spring.session.store-type'"
|
||||
},
|
||||
{
|
||||
"name": "vaessl.frontend-url",
|
||||
"name": "vaessl.frontend-local-url",
|
||||
"type": "java.lang.String",
|
||||
"description": "A description for 'vaessl.frontend-url'"
|
||||
"description": "A description for 'vaessl.frontend-local-url'"
|
||||
},
|
||||
{
|
||||
"name": "vaessl.frontend-public-url",
|
||||
"type": "java.lang.String",
|
||||
"description": "A description for 'vaessl.frontend-public-url'"
|
||||
}
|
||||
]}
|
||||
@@ -7,7 +7,7 @@ spring:
|
||||
- "optional:file:backend/.env.local[.properties]"
|
||||
- "optional:file:vaessl/backend/.env.local[.properties]"
|
||||
datasource:
|
||||
url : ${DB_URL}
|
||||
url: ${DB_URL}
|
||||
username: ${DB_USERNAME}
|
||||
password: ${DB_PASSWORD}
|
||||
driver-class-name: ${PG_DRIVER_CLASS_NAME}
|
||||
@@ -30,4 +30,5 @@ server:
|
||||
servlet:
|
||||
context-path: /api
|
||||
vaessl:
|
||||
frontend-url: ${FRONTEND_URL:http://192.168.1.208:5173/}
|
||||
frontend-local-url: ${FRONTEND_LOCAL_URL}
|
||||
frontend-public-url: ${FRONTEND_PUBLIC_URL}
|
||||
|
||||
Reference in New Issue
Block a user