SanSYS

swagger redirect

Sep 26th, 2015
51,410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. var route = new HttpRoute("help", null, null, null,
  2.     new RedirectHandler(request => string.Format("{0}://{1}",
  3.                         request.RequestUri.Scheme,
  4.                         request.RequestUri.Authority),
  5.                         "swagger/ui/index"
  6.                        )
  7.             );
  8.  
  9. GlobalConfiguration.Configuration.Routes.Add("supportGoodHelpUrl", route);
Advertisement
Add Comment
Please, Sign In to add comment