Don't include in the routing table at all, if we're not a dev server.
Patch by fu.
diffs (30 lines):
diff -r 7987e36ba2a6 -r 5cad96087a9a cgi-bin/DW/Controller/Dev.pm
--- a/cgi-bin/DW/Controller/Dev.pm Tue Feb 22 17:12:12 2011 +0800
+++ b/cgi-bin/DW/Controller/Dev.pm Tue Feb 22 17:43:00 2011 +0800
@@ -7,7 +7,7 @@
# Authors:
# Afuna <[email protected]>
#
-# Copyright (c) 2010 by Dreamwidth Studios, LLC.
+# Copyright (c) 2010-2011 by Dreamwidth Studios, LLC.
#
# This program is free software; you may redistribute it and/or modify it under
# the same terms as Perl itself. For a copy of the license, please reference
@@ -23,7 +23,8 @@ DW::Routing->register_static( '/dev/clas
DW::Routing->register_static( '/dev/classes', 'dev/classes.tt', app => 1 );
-DW::Routing->register_regex( '/dev/tests/([^/]+)(?:/(.*))?', \&tests_handler,
app => 1 );
+DW::Routing->register_regex( '/dev/tests/([^/]+)(?:/(.*))?', \&tests_handler,
app => 1 )
+ if $LJ::IS_DEV_SERVER;
sub tests_handler {
my ( $opts ) = @_;
@@ -31,7 +32,6 @@ sub tests_handler {
my $lib = $opts->subpatterns->[1] || "";
my $r = DW::Request->get;
- return $r->NOT_FOUND unless $LJ::IS_DEV_SERVER;
# force a site scheme which only shows the bare content
# but still prints out resources included using need_res
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog