You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to use the MDNS protocol to make the server
83
-
accessible via a hostname in addition to an IP address.
83
+
It is possible to use the MDNS protocol to make the server accessible via a hostname in addition
84
+
to an IP address. It is worth noting that it takes a bit longer to get the response from the server
85
+
when accessing it via the hostname.
84
86
85
87
In this example, the server is accessible via ``http://custom-mdns-hostname/`` and ``http://custom-mdns-hostname.local/``.
86
88
@@ -154,6 +156,10 @@ URL parameters
154
156
--------------
155
157
156
158
Alternatively to using query parameters, you can use URL parameters.
159
+
They are a better choice when you want to perform different actions based on the URL.
160
+
Query/GET parameters are better suited for modifying the behaviour of the handler function.
161
+
162
+
Of course it is only a suggestion, you can use them interchangeably and/or both at the same time.
157
163
158
164
In order to use URL parameters, you need to wrap them inside ``<>`` in ``Server.route``, e.g. ``<my_parameter>``.
159
165
@@ -177,6 +183,7 @@ Authentication
177
183
--------------
178
184
179
185
In order to increase security of your server, you can use ``Basic`` and ``Bearer`` authentication.
186
+
Remember that it is **not a replacement for HTTPS**, traffic is still sent **in plain text**, but it can be used to protect your server from unauthorized access.
180
187
181
188
If you want to apply authentication to the whole server, you need to call ``.require_authentication`` on ``Server`` instance.
182
189
@@ -203,8 +210,41 @@ Using ``.serve_forever()`` for this is not possible because of it's blocking beh
203
210
Each server **must have a different port number**.
204
211
205
212
In combination with separate authentication and diffrent ``root_path`` this allows creating moderately complex setups.
213
+
You can share same handler functions between servers or use different ones for each server.
0 commit comments