Jump to content

使用HyperServer后同样会出现“做安全扫描时发现有“启用了不安全的 HTTP 方法”的问题


huayan889

Recommended Posts

使用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;
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...