This allows the request handler to add extra headers to the response
even in the redirect case.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (__handle_file_request(cl, url))
return;
if (__handle_file_request(cl, url))
return;
- if (uh_handler_run(cl, &url, true) &&
- (!url || __handle_file_request(cl, url)))
- return;
+ if (uh_handler_run(cl, &url, true)) {
+ if (!url)
+ return;
+
+ uh_handler_run(cl, &url, false);
+ if (__handle_file_request(cl, url))
+ return;
+ }
req->redirect_status = 404;
if (conf.error_handler) {
req->redirect_status = 404;
if (conf.error_handler) {