mozilla-services / channelserver

🍐 A tool to associate instances of firefox.
Mozilla Public License 2.0
3 stars 6 forks source link

Bug/83 #85

Closed jrconlin closed 3 years ago

jrconlin commented 3 years ago

Description

feat: add --default_lang / PAIR_DEFAULT_LANG to set default language

Testing

test is included, but you can also test by: 1) start server 2) using websocket client of choice, connect to channelserver (e.g. $ wsdump.py --headers "Accept-Language:-" ws://localhost:8000/v1/ws/ 3) check output logs of server and see info debug statement:

{"Logger":"channelserver-1.0.0",... "Fields":{"msg":"No location info for IP","lang":"[\"en\"]","remote_ip":"127.0.0.1"}}

if desired, you can start the server with PAIR_DEFAULT_LANG="de" and perform the same ws client call and see the "lang" value change to [\"de\"]

Issue(s)

83