Lines 78-83
builder {
Link Here
|
78 |
enable "+Koha::Middleware::RealIP"; |
78 |
enable "+Koha::Middleware::RealIP"; |
79 |
|
79 |
|
80 |
mount '/opac' => builder { |
80 |
mount '/opac' => builder { |
|
|
81 |
#NOTE: it is important that these are relative links |
82 |
enable 'ErrorDocument', |
83 |
400 => 'errors/400.pl', |
84 |
401 => 'errors/401.pl', |
85 |
402 => 'errors/402.pl', |
86 |
403 => 'errors/403.pl', |
87 |
404 => 'errors/404.pl', |
88 |
500 => 'errors/500.pl', |
89 |
subrequest => 1; |
90 |
#NOTE: Without this middleware to catch fatal errors, ErrorDocument won't be able to render a 500 document |
91 |
#NOTE: This middleware must be closer to the PSGI app than ErrorDocument |
92 |
enable "HTTPExceptions"; |
81 |
if ( Log::Log4perl->get_logger('plack-opac')->has_appenders ){ |
93 |
if ( Log::Log4perl->get_logger('plack-opac')->has_appenders ){ |
82 |
enable 'Log4perl', category => 'plack-opac'; |
94 |
enable 'Log4perl', category => 'plack-opac'; |
83 |
enable 'LogWarn'; |
95 |
enable 'LogWarn'; |
Lines 85-90
builder {
Link Here
|
85 |
$opac; |
97 |
$opac; |
86 |
}; |
98 |
}; |
87 |
mount '/intranet' => builder { |
99 |
mount '/intranet' => builder { |
|
|
100 |
#NOTE: it is important that these are relative links |
101 |
enable 'ErrorDocument', |
102 |
400 => 'errors/400.pl', |
103 |
401 => 'errors/401.pl', |
104 |
402 => 'errors/402.pl', |
105 |
403 => 'errors/403.pl', |
106 |
404 => 'errors/404.pl', |
107 |
500 => 'errors/500.pl', |
108 |
subrequest => 1; |
109 |
#NOTE: Without this middleware to catch fatal errors, ErrorDocument won't be able to render a 500 document |
110 |
#NOTE: This middleware must be closer to the PSGI app than ErrorDocument |
111 |
enable "HTTPExceptions"; |
88 |
if ( Log::Log4perl->get_logger('plack-intranet')->has_appenders ){ |
112 |
if ( Log::Log4perl->get_logger('plack-intranet')->has_appenders ){ |
89 |
enable 'Log4perl', category => 'plack-intranet'; |
113 |
enable 'Log4perl', category => 'plack-intranet'; |
90 |
enable 'LogWarn'; |
114 |
enable 'LogWarn'; |