Jump to content

Avoid clickjacking attack


Darth Florus

Recommended Posts

Hi Pals:

About ClickJacking Attack.

The solution is to atttach a flag X-Frame-Options or Content-Security-Policy(frame-ancestors) into the HTTP response of the server.

Anyone know how to attach this response to the HTTP Response on UniGUI?

Thanks and

Best Regards

Link to comment
Share on other sites

Or if you are running stand alone or service than this code:

procedure TUniServerModule.UniGUIServerModuleHTTPCommand(
  ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo;
  var Handled: Boolean);
begin
  AResponseInfo.CustomHeaders.AddValue('X-Frame-Options', 'DENY');
end;
 

  • Like 2
Link to comment
Share on other sites

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...