File tree 1 file changed +0
-23
lines changed
1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -708,26 +708,3 @@ func TestProxyManager_CORSOptionsHandler(t *testing.T) {
708
708
})
709
709
}
710
710
}
711
-
712
- func TestProxyManager_CORSHeadersInRegularRequest (t * testing.T ) {
713
- config := & Config {
714
- HealthCheckTimeout : 15 ,
715
- Models : map [string ]ModelConfig {
716
- "model1" : getTestSimpleResponderConfig ("model1" ),
717
- },
718
- LogRequests : true ,
719
- }
720
-
721
- proxy := New (config )
722
- defer proxy .StopProcesses ()
723
-
724
- // Test that CORS headers are present in regular POST requests
725
- reqBody := `{"model":"model1"}`
726
- req := httptest .NewRequest ("POST" , "/v1/chat/completions" , bytes .NewBufferString (reqBody ))
727
- w := httptest .NewRecorder ()
728
-
729
- proxy .ginEngine .ServeHTTP (w , req )
730
-
731
- assert .Equal (t , http .StatusOK , w .Code )
732
- assert .Equal (t , "*" , w .Header ().Get ("Access-Control-Allow-Origin" ))
733
- }
You can’t perform that action at this time.
0 commit comments