view mod_strict_https/README.md @ 6411:b00638d74f46

mod_unified_push: Allow additional CORS headers for unified push (fixes #1985) - Request header "TTL" is mandated by the HTTP Push specification RFC 8030: https://datatracker.ietf.org/doc/html/rfc8030#section-5 - Firefox sends "Content-Encoding" with a HTTP form submission, so it is required when using the Unified Push testing tool at https://unifiedpush.org/test_wp.html (with the full URL being delivered by the UP-Example Android app) Adding both headers makes the Unified Push testing tool work from the browser. Resolves: https://issues.prosody.im/1985
author Christian Weiske <cweiske@cweiske.de>
date Sat, 21 Feb 2026 19:13:08 +0100
parents fe081789f7b5
children
line wrap: on
line source

---
summary: HTTP Strict Transport Security
---

# Introduction

This module implements [RFC 6797: HTTP Strict Transport Security] and
responds to all non-HTTPS requests with a `301 Moved Permanently`
redirect to the HTTPS equivalent of the path.

# Configuration

Add the module to the `modules_enabled` list and optionally configure
the specific header sent.

``` lua
modules_enabled = {
  ...
      "strict_https";
}
hsts_header = "max-age=31556952"
```

If the redirect from `http://` to `https://` causes trouble with
internal use of HTTP APIs it can be disabled:

``` lua
hsts_redirect = false
```

# Compatibility

  ------- -------------
  trunk   Should work
  0.12    Should work
  0.11    Should work
  ------- -------------