Skip to content
Snippets Groups Projects
Commit b26b5f15 authored by Klaus Fischer's avatar Klaus Fischer
Browse files

Added DummyServerEndpoint for GetPublicKey to verify 'User-Agent' on Requests

parent 9383d8bf
No related branches found
No related tags found
No related merge requests found
......@@ -11,4 +11,14 @@ app.MapGet("/", context => {
return context.Response.CompleteAsync();
});
app.MapGet("/v1/destinations/{id}", context => {
var userAgents = context.Request.Headers["User-Agent"];
Console.WriteLine(userAgents);
if (userAgents.ToString().Contains("FITConnectDotNetSDK"))
context.Response.StatusCode = 200;
else
context.Response.StatusCode = 400;
return context.Response.CompleteAsync();
});
app.Run("http://localhost:5050");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment