always get bad request response before any code in def root() runs
I tried adding a print as the first line of def root():
so im running from docker Ive connected into the running docker container if I run wget --post-data="some=data" localhost:5000 I get this error:
bash-4.3# wget --post-data="asd=sd" localhost:5000
Connecting to localhost:5000 (127.0.0.1:5000)
wget: server returned error: HTTP/1.0 400 BAD REQUEST
where the first line of def root(): never runs. Any ideas?
(github webhook is set to application/json and also returns that the server says bad request)
The bad request on your wget example is normal. Why Github does the same I don't know. I'd need some more information. Like your config, if you are using a secret, etc.
So here is the config:
USERNAME = "Github"
ICON_URL = "chat.example.net/github.png"
MATTERMOST_WEBHOOK_URLS = {
'default' : ("http://chat.example.net/hooks/jtk9idg4ifnj7ncm9et6tjdi5w", "off-topic"),
'metacurrency/holochain' : ("http://chat.example.net/hooks/jtk9idg4ifnj7ncm9et6tjdi5w", "feedcode"),
#'teamname' : ("yourdomain.org/hooks/hookid3", "town-square"),
#'teamname/unimportantrepo' : None,
}
GITHUB_IGNORE_ACTIONS = {
"issues": ["labeled", "assigned"],
}
SECRET = None
SHOW_AVATARS = True
SERVER = {
'hook': "/"
, 'address': "0.0.0.0"
, 'port': 5000
}
I can tell you that:
-
chat.example.net/github.pngdoes not exist - If I set SECRET to some string, there is a casting error on server startup
- Im not sure if SECRET should be set to None or to ""
Thank you
@christopherreay Sorry for the late reply. Do you still have this issue? SECRET=None should be fine. Did you set a secret in the Github webhook?