]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stats: proxied stats admin forms fix
authorJeff Buchbinder <jbuchbinder@ravemobilesafety.com>
Fri, 29 Aug 2014 20:10:08 +0000 (15:10 -0500)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2015 22:43:55 +0000 (23:43 +0100)
Patch for not using relative URLs for admin forms. This allows proxied instances
of the stats admin interface to continue to function, as the default FORM
action is to submit to the current URL.

src/dumpstats.c

index 56512e797115d30da57240b32daf6d362ba4927a..0e87f09e7f8c5e23bc1c674d16cc05631b9f38b0 100644 (file)
@@ -3630,11 +3630,7 @@ static void stats_dump_html_px_hdr(struct stream_interface *si, struct proxy *px
                }
 
                chunk_appendf(&trash,
-                             "<form action=\"%s%s%s%s\" method=\"post\">",
-                             uri->uri_prefix,
-                             (appctx->ctx.stats.flags & STAT_HIDE_DOWN) ? ";up" : "",
-                             (appctx->ctx.stats.flags & STAT_NO_REFRESH) ? ";norefresh" : "",
-                             scope_txt);
+                             "<form method=\"post\">");
        }
 
        /* print a new table */
@@ -4138,10 +4134,7 @@ static void stats_dump_html_info(struct stream_interface *si, struct uri_auth *u
        scope_txt[appctx->ctx.stats.scope_len] = '\0';
 
        chunk_appendf(&trash,
-                     "<li><form method=\"GET\" action=\"%s%s%s\">Scope : <input value=\"%s\" name=\"" STAT_SCOPE_INPUT_NAME "\" size=\"8\" maxlength=\"%d\" tabindex=\"1\"/></form>\n",
-                     uri->uri_prefix,
-                     (appctx->ctx.stats.flags & STAT_HIDE_DOWN) ? ";up" : "",
-                     (appctx->ctx.stats.flags & STAT_NO_REFRESH) ? ";norefresh" : "",
+                     "<li><form method=\"GET\">Scope : <input value=\"%s\" name=\"" STAT_SCOPE_INPUT_NAME "\" size=\"8\" maxlength=\"%d\" tabindex=\"1\"/></form>\n",
                      (appctx->ctx.stats.scope_len > 0) ? scope_txt : "",
                      STAT_SCOPE_TXT_MAXLEN);