mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-06 04:42:44 +00:00
Make User-Agent
configurable (#3255)
Fixes #3253 Adds a configuration option to overwrite the default `User-Agent` header that is send at least by the calendar and news module. Allows other modules to use the individual user agent as well. The configuration accepts either a string or a function: ``` var config = { ... userAgent: 'Mozilla/5.0 (My User Agent)', ... } ``` or ``` var config = { ... userAgent: () => 'Mozilla/5.0 (My User Agent)', ... } ``` --------- Co-authored-by: Veeck <github@veeck.de> Co-authored-by: veeck <gitkraken@veeck.de> Co-authored-by: Karsten Hassel <hassel@gmx.de> Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,7 @@ const ipfilter = require("express-ipfilter").IpFilter;
|
||||
const helmet = require("helmet");
|
||||
const socketio = require("socket.io");
|
||||
const Log = require("logger");
|
||||
const { cors, getConfig, getHtml, getVersion, getStartup, getEnvVars } = require("./server_functions");
|
||||
const { cors, getConfig, getHtml, getVersion, getStartup, getEnvVars } = require("#server_functions");
|
||||
|
||||
const vendor = require(`${__dirname}/vendor`);
|
||||
|
||||
|
Reference in New Issue
Block a user