Page 1 of 1

Request filter stops swagger ui  Topic is solved

PostPosted: Fri Oct 19, 2018 9:42 am
by SBarnes
I had added a request filter to the API to introduce logging to the API, what I found as this the stopped the Swagger UI from working, what I found I then needed to do was check the URI and bail out if the request was from Swagger such as

Code: Select all
                  string uristr = req.AbsoluteUri;
                  if(uristr == "http://localhost:81/openapi")
                  {
                     return;
                  }                  


I am posting this here in case any one runs into a similar issue.