Jump to content

Recommended Posts

Posted

使用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;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...