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
Get API URLs list from the new `server:publicApi` route instead of the static routes file.
If the protocol can not fetch the URLs from `server:publicApi`, there is some fallback:
- if the route is not available for anonymous user: print warning message and use static routes
- if the route does not exists (Kuzzle version < 1.9.0): get routes from `server:info`
- if `server:info` is restricted: print warning message and use static routes
Copy file name to clipboardExpand all lines: doc/6/protocols/http/introduction/index.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,21 @@ order: 0
10
10
11
11
The Http protocol can be used by an instance of the SDK to communicate with your Kuzzle server.
12
12
13
-
:::info
13
+
:::info
14
14
This protocol does not allow to use the [real-time notifications](/sdk/js/6/essentials/realtime-notifications/).
15
15
16
16
If you need real-time features, then you have to use either [WebSocket](/sdk/js/6/protocols/websocket) or [SocketIO](/sdk/js/6/protocols/socketio) protocols.
17
17
:::
18
+
19
+
## About HTTP routing
20
+
21
+
<SinceBadgeversion="6.2.0"/>
22
+
23
+
This protocol needs to build routes from the name of the controller and the action used. These routes are made available by Kuzzle via the [server:publicApi](/core/1/api/controllers/server/public-api) method or the [server:info](/core/1/api/controllers/server/info) method.
24
+
25
+
26
+
<SinceBadgeversion="Kuzzle 1.9.0"/>
27
+
For confidentiality reasons, it is preferable to expose only the `server:publicApi` route to the anonymous user.
28
+
If this route is not available, the SDK will use the static definition of API routes that does not include routes developed in plugins.
29
+
30
+
Finally, it is also possible to manually define the routes to the actions of its plugins using the `customRoutes` option with the [Http protocol constructor](/sdk/js/6/protocols/http/constructor).
0 commit comments