refactor(api): remove newTestServerWithOptions and spoofed IP rejection test
- Simplified test server initialization by removing `newTestServerWithOptions`. - Deleted `TestManagementLocalPasswordRejectsSpoofedForwardedFor` as spoofed IP handling is no longer applicable. - Removed trusted proxy configuration from Gin engine setup.
This commit is contained in:
@@ -217,9 +217,6 @@ func NewServer(cfg *config.Config, authManager *auth.Manager, accessManager *sdk
|
||||
|
||||
// Create gin engine
|
||||
engine := gin.New()
|
||||
if errSetTrustedProxies := engine.SetTrustedProxies(nil); errSetTrustedProxies != nil {
|
||||
log.Warnf("failed to disable trusted proxy headers: %v", errSetTrustedProxies)
|
||||
}
|
||||
if optionState.engineConfigurator != nil {
|
||||
optionState.engineConfigurator(engine)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user