Browse Source

Improved UA String

• Added version constant in bootstrap
• Made the user agent string output information in a format similar to
a web browser with software version along with OS information and
architecture
microsub
Dustin Wilson 7 years ago
parent
commit
9338219a68
  1. 1
      bootstrap.php
  2. 9
      lib/Conf.php

1
bootstrap.php

@ -4,6 +4,7 @@ namespace JKingWeb\Arsse;
const BASE = __DIR__.DIRECTORY_SEPARATOR;
const NS_BASE = __NAMESPACE__."\\";
const VERSION = "0.0.0";
if(!defined(NS_BASE."INSTALL")) define(NS_BASE."INSTALL", false);

9
lib/Conf.php

@ -29,9 +29,16 @@ class Conf {
public $userComposeNames = true;
public $userTempPasswordLength = 20;
public $userAgentString = 'Arsse (https://code.jkingweb.ca/jking/arsse)';
public $userAgentString;
public function __construct(string $import_file = "") {
$this->userAgentString = sprintf('Arsse/%s (%s %s; %s; https://code.jkingweb.ca/jking/arsse) PicoFeed (https://github.com/fguillot/picoFeed)',
VERSION, // Arsse version
php_uname('s'), // OS
php_uname('r'), // OS version
php_uname('m') // platform architecture
);
if($import_file != "") $this->importFile($import_file);
}

Loading…
Cancel
Save