We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我修改了 \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
非常感谢。
The text was updated successfully, but these errors were encountered:
这个怎么没回复,我感觉非常棒的。我也是需要公众号接口有二级路径的,所以按照这个改了一下,非常方便。 @dlyili 你提交 PR 了吗?
我这里放一下完整的 run 函数代码:
run
def run(self, isWsgi=False, debug=True, port=80, path='/'): self.isWsgi = isWsgi self.debug = debug if debug: set_logging(loggingLevel=logging.DEBUG) MainHandler = construct_handler(self, isWsgi) app = tornado.web.Application( [(path, MainHandler)], debug=debug) logger.info('itchatmp started!%s' % ( ' press Ctrl+C to exit.' if debug else '')) if isWsgi: return WSGIAdapter(app) else: port = int(port) env_test(port) app.listen(port) try: self.ioLoop.start() except: logger.info('Bye~') self.ioLoop.stop()
Sorry, something went wrong.
No branches or pull requests
我修改了 \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
非常感谢。
The text was updated successfully, but these errors were encountered: