yeg
2026-09-11 49fa64833f2eb3942eff55b7410932e70e4fc54e
talent-card-server/src/test/java/com/talentcard/server/config/ApiCorsConfigTests.java
@@ -24,7 +24,7 @@
@SpringJUnitConfig({ApiCorsConfig.class, ApiCorsConfigTests.TestMvcConfig.class})
@WebAppConfiguration
@TestPropertySource(properties = "app.cors.allowed-origins=http://localhost:7894,http://127.0.0.1:7893")
@TestPropertySource(properties = "app.cors.allowed-origins=http://localhost:7894,http://127.0.0.1:7893,http://192.168.110.26:5173")
class ApiCorsConfigTests {
    @Autowired
    private WebApplicationContext context;
@@ -77,6 +77,16 @@
                .andExpect(status().isUnauthorized());
    }
    @Test
    void lanAdminFrontendCanPreflightLogin() throws Exception {
        mvc.perform(options("/api/admin/auth/login")
                        .header("Origin", "http://192.168.110.26:5173")
                        .header("Access-Control-Request-Method", "POST")
                        .header("Access-Control-Request-Headers", "content-type,x-request-id"))
                .andExpect(status().isOk())
                .andExpect(header().string("Access-Control-Allow-Origin", "http://192.168.110.26:5173"));
    }
    @Configuration
    @EnableWebMvc
    static class TestMvcConfig {