How to use hstspreload - 1 common examples

To help you get started, we’ve selected a few hstspreload examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github encode / httpx / httpx / View on Github external
def merge_url(self, url: URLTypes) -> URL:
        Merge a URL argument together with any 'base_url' on the client,
        to create the URL used for the outgoing request.
        url = self.base_url.join(relative_url=url)
        if url.scheme == "http" and hstspreload.in_hsts_preload(
            port = None if url.port == 80 else url.port
            url = url.copy_with(scheme="https", port=port)
        return url


Chromium HSTS Preload list as a Python package

Latest version published 24 days ago

Package Health Score

73 / 100
Full package analysis

Popular hstspreload functions