conf: turn XTinyproxy into a boolean option
This is what it actually is. The string value was used in earlier versions to compare against the uri->authority string. But not as a list of sites to create an X-Tinyproxy header for, as the tinyproxy.conf template states... Michael
This commit is contained in:
parent
0539be08b4
commit
eecf145dbb
@ -457,7 +457,7 @@ static HANDLE_FUNC (handle_stathost)
|
|||||||
static HANDLE_FUNC (handle_xtinyproxy)
|
static HANDLE_FUNC (handle_xtinyproxy)
|
||||||
{
|
{
|
||||||
#ifdef XTINYPROXY_ENABLE
|
#ifdef XTINYPROXY_ENABLE
|
||||||
return set_string_arg (&conf->my_domain, line, &match[2]);
|
return set_bool_arg (&conf->add_xtinyproxy, line, &match[2]);
|
||||||
#else
|
#else
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"XTinyproxy NOT Enabled! Recompile with --enable-xtinyproxy\n");
|
"XTinyproxy NOT Enabled! Recompile with --enable-xtinyproxy\n");
|
||||||
|
@ -62,7 +62,7 @@ struct config_s {
|
|||||||
unsigned int filter_casesensitive; /* boolean */
|
unsigned int filter_casesensitive; /* boolean */
|
||||||
#endif /* FILTER_ENABLE */
|
#endif /* FILTER_ENABLE */
|
||||||
#ifdef XTINYPROXY_ENABLE
|
#ifdef XTINYPROXY_ENABLE
|
||||||
char *my_domain;
|
unsigned int add_xtinyproxy; /* boolean */
|
||||||
#endif
|
#endif
|
||||||
#ifdef REVERSE_SUPPORT
|
#ifdef REVERSE_SUPPORT
|
||||||
struct reversepath *reversepath_list;
|
struct reversepath *reversepath_list;
|
||||||
|
@ -1126,7 +1126,7 @@ process_client_headers (struct conn_s *connptr, hashmap_t hashofheaders)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(XTINYPROXY_ENABLE)
|
#if defined(XTINYPROXY_ENABLE)
|
||||||
if (config.my_domain)
|
if (config.add_xtinyproxy)
|
||||||
add_xtinyproxy_header (connptr);
|
add_xtinyproxy_header (connptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user