huayan889 Posted November 19, 2020 Share Posted November 19, 2020 使用HyperServer后同样会出现“做安全扫描时发现有“启用了不安全的 HTTP 方法”的问题,官方能否可以参考这个方法修复一下? procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); begin if (ARequestInfo.CommandType =hcHEAD) or (ARequestInfo.CommandType =hcPUT) or (ARequestInfo.CommandType =hcTRACE) or (ARequestInfo.CommandType =hcOPTION) or (ARequestInfo.CommandType =hcDELETE) then begin Handled := false; AResponseInfo.ResponseNo:=405; AResponseInfo.CloseConnection:=true; end; end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.