Update cors

This commit is contained in:
2025-08-26 15:02:31 +08:00
parent b5dc308c45
commit 1678cc0f72

View File

@@ -14,7 +14,10 @@ public class WebConfig {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // apply to all endpoints
.allowedOrigins("http://localhost:4200") // Angular dev server
.allowedOrigins(
"http://localhost:4200", // Angular dev server
"https://insurance.hzwnrw.my" // Production frontend over HTTPS
) // Angular dev server
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
.allowedHeaders("*")
.allowCredentials(true);