fix(backend): PredictionAlert 직렬화 500 에러 수정 + 로컬 프록시 Origin 헤더 보정
- PredictionAlert.event Lazy 연관 필드에 @JsonIgnore 추가 (Jackson 직렬화 실패 방지) - Vite 프록시에 Origin 헤더 재작성 추가 (로컬 개발 시 CSRF 403 방지) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
부모
30ef2cd593
커밋
49cee6c5e0
@ -5,6 +5,8 @@ import lombok.*;
|
|||||||
import org.hibernate.annotations.JdbcTypeCode;
|
import org.hibernate.annotations.JdbcTypeCode;
|
||||||
import org.hibernate.type.SqlTypes;
|
import org.hibernate.type.SqlTypes;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -44,6 +46,7 @@ public class PredictionAlert {
|
|||||||
@Column(columnDefinition = "jsonb")
|
@Column(columnDefinition = "jsonb")
|
||||||
private Map<String, Object> metadata;
|
private Map<String, Object> metadata;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "event_id", insertable = false, updatable = false)
|
@JoinColumn(name = "event_id", insertable = false, updatable = false)
|
||||||
private PredictionEvent event;
|
private PredictionEvent event;
|
||||||
|
|||||||
@ -25,6 +25,9 @@ export default defineConfig({
|
|||||||
target: process.env.VITE_API_PROXY ?? 'https://kcg-ai-monitoring.gc-si.dev',
|
target: process.env.VITE_API_PROXY ?? 'https://kcg-ai-monitoring.gc-si.dev',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
|
headers: {
|
||||||
|
Origin: process.env.VITE_API_PROXY ?? 'https://kcg-ai-monitoring.gc-si.dev',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user