I'm aware of a way to enter link description herecreate custom routes in Umbraco such that a url like:
/umbraco/surface/MyCustom[Controller]/My[Action]
Could also be available via
/some-random-path/MyCustom[Controller]/My[Action]
However if I then do:
@Url.Action("MyCustom", "My") I could end up with either of the URLs above spat out
What I'd like to do is prevent surface and api controllers ever having Umbraco in their URL because I don't want to leak the information to a hacker that I'm using Umbraco. Additionally I want to put an IP restriction on the umbraco path without worrying about blocking API and Surface requests.
SurfaceControllers (and I suspect API Controllers) get routes added to the RouteTable automatically, but I suppose I could go through and manually replace all of these. It's a bit of a pain though. Is there no setting that controls the path used by these routes?
Looks like /umbraco/surface is hardcoded, or at least you could change the word umbraco using the umbracoPath appsetting but that doesn't help my IP blocking situation.
Removing /Umbraco from routes
Hi all,
I'm aware of a way to enter link description herecreate custom routes in Umbraco such that a url like: /umbraco/surface/MyCustom[Controller]/My[Action] Could also be available via /some-random-path/MyCustom[Controller]/My[Action]
However if I then do: @Url.Action("MyCustom", "My") I could end up with either of the URLs above spat out
What I'd like to do is prevent surface and api controllers ever having Umbraco in their URL because I don't want to leak the information to a hacker that I'm using Umbraco. Additionally I want to put an IP restriction on the umbraco path without worrying about blocking API and Surface requests.
SurfaceControllers (and I suspect API Controllers) get routes added to the RouteTable automatically, but I suppose I could go through and manually replace all of these. It's a bit of a pain though. Is there no setting that controls the path used by these routes?
Cheers!
Probably answering my own question here, but perhaps someone has a workaround, it looks like this is not possible without manually going through and replacing the routes. https://github.com/umbraco/Umbraco-CMS/blob/5397f2c53acbdeb0805e1fe39fda938f571d295a/src/Umbraco.Web/WebBootManager.cs (line 356)
Looks like /umbraco/surface is hardcoded, or at least you could change the word umbraco using the
umbracoPath
appsetting but that doesn't help my IP blocking situation.I have added HttpHandlers in the web.config to alter the location that custom Umbraco controllers are accessible.
is working on a reply...