Welcome to Singapore blogs
Sign in
Singapore blogs
Search Options
Search Everything
Search Development
Home
Hubs
DotText
chuacw
Cape of Good Hope
Development
Appeal Letters readers
YP School 2007 Alumni
chuacw
frove
frove
Technical
eCommerce
More ...
A referer blocker for DotText
Home
Blog
Wiki
Chee Wee's discoveries and tech blog
Changing the world one line of code at a time...
Generic Content
About the author
Options
Share this
A referer blocker for DotText
chuacw
Mon, 26 Dec 2005 @ 9:36 PM
Comments
0
I've been tired of getting comments and trackback posts for DotText that are essentially spam.
Hence, using Borland Developer Studio 2006, I enhanced Dottext to return 404 to these requests.
In web.config, I updated the HttpHandler to read as follows:
<HttpHandler pattern="^(?:\/(\w|\s|\.)+\/services\/trackbacks/\d+\.aspx)$" type="Dottext.NoTrackback, Dottext.SpamBlocker" handlerType="Direct"/>
The corresponding class follows.
unit Dottext.SpamBlockerImpl;
interface
uses System.Web;
// Set default namespace to Dottext in Project options!
NoTrackback = class sealed(System.Object, IHttpHandler)
public
function get_IsReusable: Boolean;
procedure ProcessRequest(context: HttpContext);
end;
implementation
{ NoTrackback }
function NoTrackback.get_IsReusable: Boolean;
begin
Result := True;
end;
procedure NoTrackback.ProcessRequest(context: HttpContext);
begin
context.Response.StatusCode := 404;
context.Response.&End;
end;
end.
0 Comments
DotText development / enhancement articles
Your comment has been posted.
Close
Thank you, your comment requires moderation so it may take a while to appear.
Close
Leave a Comment
Name
Website
Comment
Post
Chee Wee's discoveries and tech blog
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Chee Wee's discoveries and tech blog
Delphi Explorer gallery
Posted
over 20 years ago
by
chuacw
0
Comments
I've created the Delphi Explorer Gallery , which show cases images of Delphi Explorer in action, using it on C# Builder, and another BPL.
Chee Wee's discoveries and tech blog
Undocumented Delphi 8 Project Settings Persistence File
Posted
over 20 years ago
by
chuacw
0
Comments
There's an undocumented Delphi 8 Project Settings Persistence File. It's known as DefProject.bdsproj. It's located in Documents and Settings\<User Name>...
Chee Wee's discoveries and tech blog
Single sourcing a Delphi component and a WinForm component
Posted
over 20 years ago
by
chuacw
0
Comments
I've been haunted by the possibility of single sourcing a Delphi component together with a WinForm component. Initially, the component was written as a...
Chee Wee's discoveries and tech blog
Random notes #1
Posted
over 20 years ago
by
chuacw
0
Comments
After a component is added to a WinForm via a Controls.Add(AComponent) statement, the component's InitLayout virtual method is called. It is best to override...
Chee Wee's discoveries and tech blog
How do you write your Boolean assignments and comparisons?
Posted
over 20 years ago
by
chuacw
0
Comments
In Delphi, when I want to set a boolean variable depending on the result of a comparison, I normally do something like, Result := Value <> 0; or...
Chee Wee's discoveries and tech blog
Random notes #2
Posted
over 20 years ago
by
chuacw
0
Comments
TCLSID, TIID translates to System.Guid Interfaces descending from IUnknown translates to an attribute with Guid, specifying the COM ID as a string parameter...
Chee Wee's discoveries and tech blog
Extracting GUID from interfaces
Posted
over 20 years ago
by
chuacw
0
Comments
I was working on COM Interop, and I got troubled with creating a Guid record every time I need to call a function that needs one. You see, a GUID is associated...
Chee Wee's discoveries and tech blog
Constructors in Delphi (aka Delphi constructors)
Posted
over 20 years ago
by
chuacw
0
Comments
Some interesting discussion is happening at Raymond Chen's blog, “ The Old New Thing ” in relation to C++ and C#. Raymond recently wrote an...
Chee Wee's discoveries and tech blog
Project meeting
Posted
over 20 years ago
by
chuacw
0
Comments
Met up with a director at Borland Singapore today, to discuss a project tender, and the services that I can provide to Borland. I mentioned that a project...
Chee Wee's discoveries and tech blog
Delphi 7.1 Pet Peeve
Posted
over 20 years ago
by
chuacw
0
Comments
UPDATE: According to Allen and Hallvard, that would be considered a breaking interface change, and is considered a BIG no-no. Read more about breaking...
Page 59 of 67 (665 items)
«
57
58
59
60
61
»
Tags
Accomplishments
Adventures in Delphi 8
Android
Blockchain
C#
CodeGear
Community Server
Delphi
Delphi for .NET
Delphi for Win32
DotText development / enhancement articles
Experiments
General
Hacking
Java
Javascript
Latest rumours / news about Borland Delphi 2005
Movies CMS for Migration
My RSS Reader
Network
OTA
Projects / Businesses
Security
ToolsAPI
Windows