MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

Make User-Agent configurable

Open m-idler opened this issue 2 years ago • 0 comments

I just encountered an error regarding fetching a subscribed calendar. By debugging I could verify, that the issue is caused by the server, blocking requests based on matching Node.js in the User-Agent header. By reading through other issues i saw, that from time to time there have been some other issues regarding parts of the use agent (e.g. #2729 ). So I would suggest, to add a configuration option to optionally override the user-agent at least for default modules calendar and news (see https://github.com/MichMich/MagicMirror/blob/343e7de7bd295a69e68e4ee520552e0785a99e1c/modules/default/newsfeed/newsfeedfetcher.js#L105 and https://github.com/MichMich/MagicMirror/blob/343e7de7bd295a69e68e4ee520552e0785a99e1c/modules/default/calendar/calendarfetcher.js#L42 ). Other modules are then free to consume this option as well.

If you agree on that, i won't mind to open a PR to tackle it.

m-idler avatar Oct 26 '23 20:10 m-idler