Commit 550eb030 by emsys

routing!

parent bc26796d
......@@ -8,6 +8,7 @@ object WsServerModule: TWsServerModule
object XDataServer1: TXDataServer
Dispatcher = SparkleHttpSysDispatcher
ModelName = 'Ws'
UnknownMemberHandling = Error
EntitySetPermissions = <>
SwaggerOptions.Enabled = True
SwaggerOptions.AuthMode = Jwt
......@@ -23,7 +24,6 @@ object WsServerModule: TWsServerModule
end
object XDataServer1JWT: TSparkleJwtMiddleware
OnGetSecret = XDataServer1JWTGetSecret
TokenParam = 'token'
end
object XDataServer1WebSocket: TSparkleWebSocketMiddleware
AllowedOrigins.Strings = (
......
......@@ -70,10 +70,10 @@ begin
Url := ABaseUrl;
if not Url.EndsWith('/') then
Url := Url + '/';
Url := Url + SERVER_PATH_SEGMENT;
XDataServer1.BaseUrl := Url;
XDataServer1.ModelName := AModelName;
XDataServer1JWT.TokenParam := 'token';
//XDataServer1JWT.Secret := 'token';
SparkleHttpSysDispatcher.Start;
Logger.Log(1, Format('Ws server module listening at "%s"', [Url]));
end;
......
......@@ -9,13 +9,12 @@ const
WS_MODEL = 'Ws';
type
[ServiceContract, Model(WS_MODEL), Route('ws')]
[ServiceContract]
[Route('ws')]
IWebSocketService = interface(IInvokable)
['{673FE678-D9EF-468D-89CB-CEF26E8758BC}']
[HttpGet, Route('emimobile')]
procedure WebSockerConnectionHandler;
[HttpGet, Route('health')]
function Health: string;
end;
implementation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment