How to hide the /api

how to hide the /api ?
I found Feature.All.Remove(Feature.PredefinedRoutes) can hide , but in winform use gateway.send to invoke the webservice, will not found the method.
so how to hide the /api , I can’t want to show it in production environment.
.net core webservice used ServiceStack Version 6.9. winform used servicestack 4.0.62

You can disable the JSON /api route with:

ConfigurePlugin<PredefinedRoutesFeature>(feature => feature.JsonApiRoute = null);

OK, thanks. works fine!

1 Like