MCPcopy Index your code
hub / github.com/tiny-pilot/tinypilot / settings_requires_https_get

Function settings_requires_https_get

app/api.py:651–667  ·  view source on GitHub ↗

Returns whether the server requires the client to connect via HTTPS. Note that the server itself doesn’t handle TLS currently. It only checks how the client has connected to the upstream proxy server. Returns: A JSON data structure with the following properties: require

()

Source from the content-addressed store, hash-verified

649@api_blueprint.route('/settings/requiresHttps', methods=['GET'])
650@required_auth(auth.Role.ADMIN)
651def settings_requires_https_get():
652 """Returns whether the server requires the client to connect via HTTPS.
653
654 Note that the server itself doesn’t handle TLS currently. It only checks how
655 the client has connected to the upstream proxy server.
656
657 Returns:
658 A JSON data structure with the following properties:
659 requiresHttps: bool.
660
661 Example:
662 {
663 "requiresHttps": true
664 }
665 """
666 return json_response.success(
667 {'requiresHttps': db.settings.Settings().requires_https()})
668
669
670@api_blueprint.route('/settings/requiresHttps', methods=['PUT'])

Callers

nothing calls this directly

Calls 1

requires_httpsMethod · 0.80

Tested by

no test coverage detected