Skip to content

自定义路由改进 #47

@dlyili

Description

@dlyili

我修改了 \itchatmp\components\register.py 文件中的run函数,添加了一个自定义的url参数,修改代码如下:
def run(self, isWsgi=False, debug=True, port=80, url='/'):
self.isWsgi = isWsgi
self.debug = debug
if debug:
set_logging(loggingLevel=logging.DEBUG)
MainHandler = construct_handler(self, isWsgi)
app = tornado.web.Application(
[(url, MainHandler)], debug=debug)
添加这个url参数,主要是在实际应用中,我使用nginx做代理,微信公众号服务器地址有二级路径,例如:http://vfczq9.natappfree.cc/yl
希望这个功能可以添加到主版本中,目前我是fork了一个版本:https://github.com/dlyili/itchatmp

非常感谢。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions