Removing/changing extra debug paths

I’ve noticed my production service has at least 2 extra paths I was not aware of:

  1. /metadata/svg
  2. /Templates/license.html

This is with both Feature.Metadata removed, and DebugMode false.

What is the correct procedure to remove/change those paths, and are there any other debug/metadata paths I may not be aware of? /metadata correctly 404’s in production and I believed that would cover all of this extra debug stuff, but I guess it doesn’t.

Hi @Eaton,

These paths come from the SvgFeature plugin and embedded resources that are registered by default and served by the StaticFileHandler. These default embedded resources are used for some default ServiceStack features, so if you are wanting to just remove those two paths I’d suggest the config below.

Plugins.RemoveAll(x => x is SvgFeature);
RawHttpHandlers.Add(req => 
    req.PathInfo.StartsWith("/Templates") ? new NotFoundHttpHandler() : null);

The second line will pick up any paths starting with /Templates and returh 404 error.

You can also find a list of pre registered plugins and now to remove them at:

@layoric Thanks - that works!

@mythz Looks like that list is incomplete. Plugins like NativeTypesFeature, SpanFormats and HttpCacheFeature are missing.