How to use the hstspreload.in_hsts_preload function in hstspreload

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 / client.py 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(url.host):
            port = None if url.port == 80 else url.port
            url = url.copy_with(scheme="https", port=port)
        return url

hstspreload

Chromium HSTS Preload list as a Python package

BSD-3-Clause
Latest version published 23 days ago

Package Health Score

73 / 100
Full package analysis

Popular hstspreload functions

Similar packages