Skip to content

ziguzagu/Plack-Middleware-DefaultDocument

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME
    Plack::Middleware::DefaultDocument - Return default document with '200'
    instead of '404' error

SYNOPSIS
      enable "DefaultDocument" => (
          '/favicon\.ico$' => '/path/to/htodcs/favicon.ico',
          '/robots\.txt'   => '/path/to/htdocs/robots.txt',
      );

DESCRIPTION
    This DefaultDocument middleware is able to return '200' response with
    default document instead of '404' error. It is useful in the case that
    your application can't find any contents from database, assets of users,
    static assets and etc, but has system default file for request URL and
    to want to return it with '200' reponse, not '404' errror.

SEE ALSO
    Plack::Middleware::ErrorDocument

AUTHOR
    Hiroshi Sakai <[email protected]>

LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

About

Return default document with '200' instead of '404' error

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages