| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
$bools = array( |
| 6 |
0 => __('Off', 'http-headers'), |
| 7 |
1 => __('On', 'http-headers'), |
| 8 |
); |
| 9 |
|
| 10 |
$categories = array( |
| 11 |
'security' => __('Security', 'http-headers'), |
| 12 |
'access-control' => __('Access control', 'http-headers'), |
| 13 |
'authentication' => __('Authentication', 'http-headers'), |
| 14 |
'compression' => __('Compression', 'http-headers'), |
| 15 |
'caching' => __('Caching', 'http-headers'), |
| 16 |
'misc' => __('Miscellaneous', 'http-headers'), |
| 17 |
); |
| 18 |
|
| 19 |
$headers = array( |
| 20 |
'x-frame-options' => array('X-Frame-Options', 'hh_x_frame_options', 'security'), |
| 21 |
'x-xss-protection' => array('X-XSS-Protection', 'hh_x_xxs_protection', 'security'), |
| 22 |
'x-content-type-options' => array('X-Content-Type-Options', 'hh_x_content_type_options', 'security'), |
| 23 |
'x-ua-compatible' => array('X-UA-Compatible', 'hh_x_ua_compatible', 'misc'), |
| 24 |
'strict-transport-security' => array('Strict-Transport-Security', 'hh_strict_transport_security', 'security'), |
| 25 |
'p3p' => array('P3P', 'hh_p3p', 'access-control'), |
| 26 |
'public-key-pins' => array('Public-Key-Pins', 'hh_public_key_pins', 'security'), |
| 27 |
'referrer-policy' => array('Referrer-Policy', 'hh_referrer_policy', 'security'), |
| 28 |
'content-security-policy' => array('Content-Security-Policy', 'hh_content_security_policy', 'security'), |
| 29 |
'access-control-allow-origin' => array('Access-Control-Allow-Origin', 'hh_access_control_allow_origin', 'access-control'), |
| 30 |
'access-control-allow-credentials' => array('Access-Control-Allow-Credentials', 'hh_access_control_allow_credentials', 'access-control'), |
| 31 |
'access-control-max-age' => array('Access-Control-Max-Age', 'hh_access_control_max_age', 'access-control'), |
| 32 |
'access-control-allow-methods' => array('Access-Control-Allow-Methods', 'hh_access_control_allow_methods', 'access-control'), |
| 33 |
'access-control-allow-headers' => array('Access-Control-Allow-Headers', 'hh_access_control_allow_headers', 'access-control'), |
| 34 |
'access-control-expose-headers' => array('Access-Control-Expose-Headers', 'hh_access_control_expose_headers', 'access-control'), |
| 35 |
'content-encoding' => array('Content-Encoding', 'hh_content_encoding', 'compression'), |
| 36 |
'vary' => array('Vary', 'hh_vary', 'compression'), |
| 37 |
'x-powered-by' => array('X-Powered-By', 'hh_x_powered_by', 'misc'), |
| 38 |
'www-authenticate' => array('WWW-Authenticate', 'hh_www_authenticate', 'authentication'), |
| 39 |
'cache-control' => array('Cache-Control', 'hh_cache_control', 'caching'), |
| 40 |
'expires' => array('Expires', 'hh_expires', 'caching'), |
| 41 |
'pragma' => array('Pragma', 'hh_pragma', 'caching'), |
| 42 |
'age' => array('Age', 'hh_age', 'caching'), |
| 43 |
'connection' => array('Connection', 'hh_connection', 'misc'), |
| 44 |
'cookie-security' => array('Cookie security', 'hh_cookie_security', 'security'), |
| 45 |
'expect-ct' => array('Expect-CT', 'hh_expect_ct', 'security'), |
| 46 |
'timing-allow-origin' => array('Timing-Allow-Origin', 'hh_timing_allow_origin', 'access-control'), |
| 47 |
'custom-headers' => array('Custom headers', 'hh_custom_headers', 'misc'), |
| 48 |
'x-dns-prefetch-control' => array('X-DNS-Prefetch-Control', 'hh_x_dns_prefetch_control', 'security'), |
| 49 |
'x-download-options' => array('X-Download-Options', 'hh_x_download_options', 'security'), |
| 50 |
'x-permitted-cross-domain-policies' => array('X-Permitted-Cross-Domain-Policies', 'hh_x_permitted_cross_domain_policies', 'security'), |
| 51 |
'report-to' => array('Report-To', 'hh_report_to', 'security'), |
| 52 |
'feature-policy' => array('Feature-Policy', 'hh_feature_policy', 'security'), |
| 53 |
); |
| 54 |
|
| 55 |
$options = array( |
| 56 |
'hh_method', |
| 57 |
'hh_x_frame_options', |
| 58 |
'hh_x_frame_options_value', |
| 59 |
'hh_x_frame_options_domain', |
| 60 |
'hh_x_xxs_protection', |
| 61 |
'hh_x_xxs_protection_value', |
| 62 |
'hh_x_xxs_protection_uri', |
| 63 |
'hh_x_content_type_options', |
| 64 |
'hh_x_content_type_options_value', |
| 65 |
'hh_strict_transport_security', |
| 66 |
'hh_strict_transport_security_value', //obsolete |
| 67 |
'hh_strict_transport_security_max_age', |
| 68 |
'hh_strict_transport_security_sub_domains', |
| 69 |
'hh_strict_transport_security_preload', |
| 70 |
'hh_public_key_pins', |
| 71 |
'hh_public_key_pins_sha256_1', |
| 72 |
'hh_public_key_pins_sha256_2', |
| 73 |
'hh_public_key_pins_max_age', |
| 74 |
'hh_public_key_pins_sub_domains', |
| 75 |
'hh_public_key_pins_report_uri', |
| 76 |
'hh_public_key_pins_report_only', |
| 77 |
'hh_x_ua_compatible', |
| 78 |
'hh_x_ua_compatible_value', |
| 79 |
'hh_p3p', |
| 80 |
'hh_p3p_value', |
| 81 |
'hh_referrer_policy', |
| 82 |
'hh_referrer_policy_value', |
| 83 |
'hh_content_security_policy', |
| 84 |
'hh_content_security_policy_value', |
| 85 |
'hh_content_security_policy_report_only', |
| 86 |
'hh_access_control_allow_origin', |
| 87 |
'hh_access_control_allow_origin_value', |
| 88 |
'hh_access_control_allow_origin_url', |
| 89 |
'hh_access_control_allow_credentials', |
| 90 |
'hh_access_control_allow_credentials_value', |
| 91 |
'hh_access_control_allow_methods', |
| 92 |
'hh_access_control_allow_methods_value', |
| 93 |
'hh_access_control_allow_headers', |
| 94 |
'hh_access_control_allow_headers_value', |
| 95 |
'hh_access_control_expose_headers', |
| 96 |
'hh_access_control_expose_headers_value', |
| 97 |
'hh_access_control_max_age', |
| 98 |
'hh_access_control_max_age_value', |
| 99 |
'hh_content_encoding', |
| 100 |
'hh_content_encoding_value', |
| 101 |
'hh_content_encoding_ext', |
| 102 |
'hh_vary', |
| 103 |
'hh_vary_value', |
| 104 |
'hh_x_powered_by', |
| 105 |
'hh_x_powered_by_option', |
| 106 |
'hh_x_powered_by_value', |
| 107 |
'hh_www_authenticate', |
| 108 |
'hh_www_authenticate_type', |
| 109 |
'hh_www_authenticate_realm', |
| 110 |
'hh_www_authenticate_user', |
| 111 |
'hh_www_authenticate_pswd', |
| 112 |
'hh_cache_control', |
| 113 |
'hh_cache_control_value', |
| 114 |
'hh_age', |
| 115 |
'hh_age_value', |
| 116 |
'hh_pragma', |
| 117 |
'hh_pragma_value', |
| 118 |
'hh_expires', |
| 119 |
'hh_expires_value', |
| 120 |
'hh_expires_type', |
| 121 |
'hh_connection', |
| 122 |
'hh_connection_value', |
| 123 |
'hh_cookie_security', |
| 124 |
'hh_cookie_security_value', |
| 125 |
'hh_expect_ct', |
| 126 |
'hh_expect_ct_max_age', |
| 127 |
'hh_expect_ct_report_uri', |
| 128 |
'hh_expect_ct_enforce', |
| 129 |
'hh_timing_allow_origin', |
| 130 |
'hh_timing_allow_origin_value', |
| 131 |
'hh_timing_allow_origin_url', |
| 132 |
'hh_x_permitted_cross_domain_policies', |
| 133 |
'hh_x_permitted_cross_domain_policies_value', |
| 134 |
'hh_x_download_options', |
| 135 |
'hh_x_download_options_value', |
| 136 |
'hh_x_dns_prefetch_control', |
| 137 |
'hh_x_dns_prefetch_control_value', |
| 138 |
'hh_custom_headers', |
| 139 |
'hh_custom_headers_value', |
| 140 |
'hh_report_to', |
| 141 |
'hh_report_to_value', |
| 142 |
'hh_feature_policy', |
| 143 |
'hh_feature_policy_feature', |
| 144 |
'hh_feature_policy_origin', |
| 145 |
'hh_feature_policy_value', |
| 146 |
); |