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
()
| 649 | @api_blueprint.route('/settings/requiresHttps', methods=['GET']) |
| 650 | @required_auth(auth.Role.ADMIN) |
| 651 | def 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']) |
nothing calls this directly
no test coverage detected