mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-25 17:17:54 +01:00
Basic Auth for web_server component (#304)
* Basic auth * Basic auth * typo * Update web_server.rst * Move auth example out of top-level example Reason: Most users will copy-paste that into their config directly, which then causes a validation error because of the missing !secret value. Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
parent
92975768af
commit
e91a665ba4
@ -38,11 +38,25 @@ Configuration variables:
|
||||
to https://esphome.io/_static/webserver-v1.min.css (updates will go to ``v2``, ``v3``, etc).
|
||||
- **js_url** (*Optional*, url): The URL that should be used for the JS script. Defaults
|
||||
to https://esphome.io/_static/webserver-v1.min.js.
|
||||
- **auth** (*Optional*): Enables basic authentication with username and password.
|
||||
|
||||
- **username** (**Required**, string): The username to use for authentication.
|
||||
- **password** (**Required**, string): The password to check for authentication.
|
||||
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
||||
.. note::
|
||||
|
||||
Starting with version 1.9.0, you can also upload firmware files OTA with the web server.
|
||||
Example web_server configuration using HTTP authentication:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
web_server:
|
||||
port: 80
|
||||
auth:
|
||||
username: admin
|
||||
password: !secret web_server_password
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
Loading…
Reference in New Issue
Block a user