IPWhitelist 1.0.0-beta.2
See the version list below for details.
dotnet add package IPWhitelist --version 1.0.0-beta.2
NuGet\Install-Package IPWhitelist -Version 1.0.0-beta.2
<PackageReference Include="IPWhitelist" Version="1.0.0-beta.2" />
paket add IPWhitelist --version 1.0.0-beta.2
#r "nuget: IPWhitelist, 1.0.0-beta.2"
// Install IPWhitelist as a Cake Addin #addin nuget:?package=IPWhitelist&version=1.0.0-beta.2&prerelease // Install IPWhitelist as a Cake Tool #tool nuget:?package=IPWhitelist&version=1.0.0-beta.2&prerelease
Optimzely IPWhitelist
This free module is designed for blocking/restricting access on a per site basis for Optimizely CMS 12+
solution hosted on Optimizely DXP with the following features
- Whitelist single IP address per site basis
- Whitelist a range of IP addresses via CIDR per site basis
- Whitelist known paths (e.g. /episerver/health)
Configuration
Startup.cs
After installing the package IPWhitelist
in your project, you need to ensure the following lines are added to the startup class of your solution:
public void ConfigureServices(IServiceCollection services)
{
// .... other services
services.AddIpWhitelist();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// Add IPWhitelist middleware before any other middleware
app.UseIpWhitelist();
// ... other middleware
}
The call to services.AddIpWhitelist()
sets up the dependency injection required by the IPWhitelist
to ensure the solution works as intended. This works by following the Services Extensions pattern defined by Microsoft.
Module access control
By default, only users in CmsAdmins
, WebAdmins
and Administrators
role can access Admin UI.
If you would like to use you custom policy, you can customize it with your own AuthorizationOptions
when registering the IPWhitelist
.
services.AddIpWhitelist(options =>
{
options.AddPolicy("yourPolicyName", policy =>
{
policy.RequireRole("yourRoleName");
});
});
Troubleshooting
The module has extensive logging. Turn on information logging for the IPWhitelist
namespace in your logging configuration.
"Logging": {
"LogLevel": {
"Default": "Warning",
"IPWhitelist":"Information" // Add this line
}
}
Limitations
- This module is NOT designed to work with
Optimizely CMS 11
or below.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- EPiServer.CMS.AspNetCore.Mvc (>= 12.4.0 && < 13.0.0)
- EPiServer.CMS.Core (>= 12.4.0 && < 13.0.0)
- EPiServer.CMS.UI.Core (>= 12.4.0 && < 13.0.0)
- Htmx (>= 1.7.0)
- Htmx.TagHelpers (>= 1.7.0)
- X.PagedList (>= 8.4.7)
- X.PagedList.Mvc.Core (>= 8.4.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta.5 | 1,908 | 3/20/2024 |
1.0.0-beta.4 | 70 | 3/18/2024 |
1.0.0-beta.3 | 63 | 3/12/2024 |
1.0.0-beta.2 | 59 | 3/7/2024 |
1.0.0-beta.1 | 63 | 3/6/2024 |