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
Consider this script:
__requires__ = ['cherrypy'] import os import cherrypy class Server: @cherrypy.expose def index(self): return cherrypy.url('/foo/') @classmethod def run(cls): config = { 'global': { 'server.socket_port': int(os.environ.get('PORT', 8080)), 'tools.proxy.on': True, }, } cherrypy.quickstart(cls(), config=config) __name__ == '__main__' and Server.run()
Run it and request / and you'll get:
/
$ curl http://localhost:8080/ http://localhost:8080:8080/foo/
The text was updated successfully, but these errors were encountered:
Add test capturing expectation. Ref #1627.
be62d1b
In proxy tool, more simply rely on the existing request.base if no Ho…
77ef858
…st header exists and no base was indicated. Avoid adding an extra port indicator. Fixes #1627.
72ec654
cfc5d9b
No branches or pull requests
Consider this script:
Run it and request
/
and you'll get:The text was updated successfully, but these errors were encountered: