diff options
author | Sampath Kumar Krishnan <sampathBlam@users.noreply.github.com> | 2020-04-24 23:26:06 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 17:56:06 +0000 |
commit | b7e866909a1c96be5965c57289af551869dce2aa (patch) | |
tree | 491bae1d1fb98c1dee5ba9058974737d8ca3ce25 /uncompressed/hangoutschat/index.js | |
parent | Update agent agent configuration (diff) | |
download | ferdium-recipes-b7e866909a1c96be5965c57289af551869dce2aa.tar.gz ferdium-recipes-b7e866909a1c96be5965c57289af551869dce2aa.tar.zst ferdium-recipes-b7e866909a1c96be5965c57289af551869dce2aa.zip |
Implement modifyRequestHeaders for Hangouts and document (#137)
Co-Authored-By: Mahadevan Sreenivasan <mahadevan_sv@yahoo.com>
Diffstat (limited to 'uncompressed/hangoutschat/index.js')
-rw-r--r-- | uncompressed/hangoutschat/index.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/uncompressed/hangoutschat/index.js b/uncompressed/hangoutschat/index.js index 95e7fa5..819e06b 100644 --- a/uncompressed/hangoutschat/index.js +++ b/uncompressed/hangoutschat/index.js | |||
@@ -3,6 +3,16 @@ var os = require('os') | |||
3 | // just pass through Franz | 3 | // just pass through Franz |
4 | module.exports = Franz => | 4 | module.exports = Franz => |
5 | class HangoutsChat extends Franz { | 5 | class HangoutsChat extends Franz { |
6 | // Method to add headers to requests from Hangouts Chat's webview | ||
7 | modifyRequestHeaders() { | ||
8 | return [{ | ||
9 | headers: { 'origin': 'https://chat.google.com' }, | ||
10 | requestFilters: { | ||
11 | urls: ['*://*/*'] | ||
12 | } | ||
13 | }] | ||
14 | } | ||
15 | |||
6 | overrideUserAgent() { | 16 | overrideUserAgent() { |
7 | if (os.platform() == 'linux') | 17 | if (os.platform() == 'linux') |
8 | return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" | 18 | return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" |