Answer the question
In order to leave comments, you need to log in
Why is Tornado ignoring ALL POST requests?
The server is on Ubuntu Server 18.04, there are no specific ifconfig settings, etc. (default).
GENERAL_ROUTE = ((r"/(.*)", tornado.web.StaticFileHandler, {"path": settings.DIR_WWW_FILES,
"default_filename": "index.html"}),
(r"/vk/(.*?):(.*?)", handlers.VkCB),
(r"/tg/(.*?)", handlers.Tg),
(r"/donate/notification", handlers.Fk),)
HTTP_PORT = 20080
HTTP_ROUTE = ((r"/(.*?)", handlers.HttpMain),
*GENERAL_ROUTE)
HTTPS_PORT = 20443
HTTPS_ROUTE = (*GENERAL_ROUTE,)
SSL = {"certfile": path.join(settings.DIR_SSL, "certificate.crt"),
"keyfile": path.join(settings.DIR_SSL, "private.key"),
"ca_certs": path.join(settings.DIR_SSL, "ca_bundle.crt")}
class Main(ModulesBase):
def __init__(self):
http = tornado.httpserver.HTTPServer(
tornado.web.Application(HTTP_ROUTE)
)
https = tornado.httpserver.HTTPServer(
tornado.web.Application(HTTPS_ROUTE),
ssl_options=SSL
)
http.add_sockets(tornado.netutil.bind_sockets(HTTP_PORT))
https.add_sockets(tornado.netutil.bind_sockets(HTTPS_PORT))
tornado.process.fork_processes(0)
tornado.ioloop.IOLoop.instance().start()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question