Fixed: proxy_redirect with regex might broke Refresh header. The problem was localized in ngx_http_proxy_rewrite_redirect_regex() handler function which did not take into account prefix when overwriting header value.