Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ziguzagu/plack-middleware-defaultdocument
Return default document with '200' instead of '404' error
https://github.com/ziguzagu/plack-middleware-defaultdocument
cpan perl plack
Last synced: 29 days ago
JSON representation
Return default document with '200' instead of '404' error
- Host: GitHub
- URL: https://github.com/ziguzagu/plack-middleware-defaultdocument
- Owner: ziguzagu
- Created: 2013-03-06T01:42:48.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-12T08:47:00.000Z (almost 12 years ago)
- Last Synced: 2024-10-15T10:17:19.162Z (2 months ago)
- Topics: cpan, perl, plack
- Language: Perl
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Plack::Middleware::DefaultDocument - Return default document with '200'
instead of '404' errorSYNOPSIS
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::ErrorDocumentAUTHOR
Hiroshi SakaiLICENSE
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.