certbot/letsencrypt-apache/letsencrypt_apache/constants.py

41 lines
1.2 KiB
Python
Raw Normal View History

"""Apache plugin constants."""
import pkg_resources
2015-05-08 17:32:13 -04:00
CLI_DEFAULTS = dict(
server_root="/etc/apache2",
ctl="apache2ctl",
enmod="a2enmod",
2015-07-30 02:40:07 -04:00
dismod="a2dismod",
le_vhost_ext="-le-ssl.conf",
2015-05-08 17:32:13 -04:00
)
"""CLI defaults."""
MOD_SSL_CONF_DEST = "options-ssl-apache.conf"
"""Name of the mod_ssl config file as saved in `IConfig.config_dir`."""
MOD_SSL_CONF_SRC = pkg_resources.resource_filename(
"letsencrypt_apache", "options-ssl-apache.conf")
"""Path to the Apache mod_ssl config file found in the Let's Encrypt
distribution."""
2015-11-04 15:12:39 -05:00
AUGEAS_LENS_DIR = pkg_resources.resource_filename(
"letsencrypt_apache", "augeas_lens")
"""Path to the Augeas lens directory"""
REWRITE_HTTPS_ARGS = [
2015-07-21 20:16:46 -04:00
"^", "https://%{SERVER_NAME}%{REQUEST_URI}", "[L,QSA,R=permanent]"]
"""Apache rewrite rule arguments used for redirections to https vhost"""
2015-11-06 17:31:30 -05:00
2015-11-07 23:37:57 -05:00
HSTS_ARGS = ["always", "set", "Strict-Transport-Security",
2015-11-06 17:31:30 -05:00
"\"max-age=31536000; includeSubDomains\""]
"""Apache header arguments for HSTS"""
2015-11-07 23:37:57 -05:00
UIR_ARGS = ["always", "set", "Content-Security-Policy",
2015-11-08 10:21:36 -05:00
"upgrade-insecure-requests"]
2015-11-07 23:37:57 -05:00
2015-11-08 10:21:36 -05:00
HEADER_ARGS = {"Strict-Transport-Security": HSTS_ARGS,
"Upgrade-Insecure-Requests": UIR_ARGS}
2015-11-07 23:37:57 -05:00