Add overrides option to set User-Agent header.
This commit is contained in:
parent
c7f51fdb57
commit
6f62f72a1b
|
@ -532,7 +532,13 @@ function message_post($subject, $from, $newsgroups, $ref, $body, $encryptthis =
|
|||
fputs($ns, "Content-Type: text/plain; charset=" . $www_charset . "; format=flowed\r\n");
|
||||
fputs($ns, "Content-Transfer-Encoding: 8bit\r\n");
|
||||
}
|
||||
if (isset($OVERRIDES['user_agent'])) {
|
||||
if ($OVERRIDES['user_agent'] != '') {
|
||||
fputs($ns, "User-Agent: " . $OVERRIDES['user_agent'] . "\r\n");
|
||||
}
|
||||
} else {
|
||||
fputs($ns, "User-Agent: Rocksolid Light\r\n");
|
||||
}
|
||||
if ($send_poster_host)
|
||||
@fputs($ns, 'X-HTTP-Posting-Host: ' . gethostbyaddr(getenv("REMOTE_ADDR")) . "\r\n");
|
||||
if (($ref != false) && (count($ref) > 0)) {
|
||||
|
|
|
@ -58,6 +58,10 @@ return [
|
|||
// If unset, default is 'articles'
|
||||
'overboard_default_view' => 'articles',
|
||||
|
||||
// Set User-Agent: string (default = 'Rocksolid Light')
|
||||
// Set to '' for no User-Agent: header
|
||||
'user_agent' => 'Rocksolid Light',
|
||||
|
||||
// Just leave this here to avoid comma errors
|
||||
'comma' => true
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue