模拟vhm url的url重写中间件。
mr.monster的Python项目详细描述
他很可怕。
关于
Monster先生是一个wsgi中间件,旨在简化本地测试 最终将在apache之后使用重写规则提供服务的管道 地点。
配置非常简单,常见情况是:
[filter:monster] use = egg:mr.monster#rewrite host = www.example.com port = 80
只需添加正确的virtualhostbase/root声明。
如果未提供配置选项,则入站请求将 反省。要避免这种情况,请设置显式主机和端口。对于想要 使用自动检测egg:mr.monster#rewrite行可以直接添加到 管道。
选项
autodetect: | Pick a host and port from the inbound request. |
---|---|
host: | Set the canonical hostname to pass to Zope. If used you must provide a port. |
port: | Set the canonical port. If used you must provide a host. |
internalpath: | A path in the form /foo/site that is the base of your application in Zope. |
externalpath: | A path in the form /bar/baz to filter from a request using _vh_bar syntax. |
scheme: | The URI scheme to use in the virtual host, by default this is detected automatically. |
发布历史记录
2010年8月24日(1.4)
- 添加对重写uri方案的支持 (艾伦·霍伊)
- 使空字符串成为重新引导中间件的脚本名的规范表示 (马修威尔克斯)
- 添加用于设置脚本名的辅助中间件 (马修威尔克斯)
- 重构测试中的断言端点,使其更像一个普通的wsgi 应用程序 (马修威尔克斯)
2009年8月30日(1.3)
- 从传入的路径信息中删除外部路径,防止 /vh_foo/foo,表现为完全剥皮的plone位点 信息。这让我很难过。哦,是的。 (马修威尔克斯)
2009年8月18日(1.2)
- 在客户端为 主机头。 (马修威尔克斯)
2009年8月13日(1.1)
- 使没有提供本地配置的情况下自动检测,而不是传递 (马修威尔克斯)
- 更喜欢http_主机而不是服务器名,这样http/1.1客户端工作更可靠。 (艾伦·霍伊)
2009年7月24日(1.0)
- 初次发布(Matthew Wilkes)