跳转到主要内容

强制HTTPS的小工具。

项目描述

简介

pyramid_force_https 是一个用于tween 的工具,用于将所有 HTTP 请求重定向到 HTTPS。

安装

只需这样做

pip install pyramid_force_https

easy_install pyramid_force_https

兼容性

pyramid_force_https 与 pyramid>=1.7 和 python>=2.7 以及 python>=3.5 兼容。其他版本也可能兼容。

文档

用法示例

def main(global_config, **settings):
    config = Configurator(settings=settings)
    config.include('pyramid_force_https')
    return config.make_wsgi_app()

查看测试以获取更多示例。

如果您使用 structlog,请将以下配置设置添加到您的 INI 文件中,以启用 structlog-like 记录

pyramid_force_https.structlog = true

发布

  1. 更新 CHANGES.rst。

  2. 更新 setup.py 版本。

  3. 运行 bin/longtest

  4. 运行 bin/mkrelease -d pypi

变更

0.1.1

  • 更好的 structlog 变量名称。[zupo]

0.1

  • 初始发布。[zupo]

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源分布

pyramid_force_https-0.1.1.tar.gz (4.8 kB 查看哈希值)

上传时间 源代码

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面