-
Notifications
You must be signed in to change notification settings - Fork 19
Restrict Ip Address Plugin
Si Carter edited this page Oct 21, 2018
·
1 revision
The restrict Ip plugin automatically restricts access to a specific route to one or more Ip addresses.
To setup a restricted route you add RestrictedRouteAttribute to a controller class.
[RestrictedIpRoute("RestrictedRouteRemote")]
The route name is user defined and configured within AppSettings.json file
"RestrictedIpRoutes.Plugin": {
"Disabled": true,
"RouteRestrictions": {
"RestrictedRouteAllowAll": "*",
"RestrictedRouteLocal": "localhost",
"RestrictedRouteRemote": "10.30.*;192.168.*"
} },
The RouteRestrictions section comprises of a user defined route name and a semi colon separated list of part or full Ip Addresses.
"localhost" can be specified, however, local Ip addresses are never restricted, so you can always gain access to the page from the computer where it is hosted.