forked from OrchardCMS/OrchardCore
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide IConfiguration extensions to configure certain modules (Lombi…
…q Technologies: OCORE-97) (OrchardCMS#12033)
- Loading branch information
Showing
16 changed files
with
362 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/OrchardCore.Modules/OrchardCore.Email/Extensions/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using OrchardCore.Environment.Shell.Configuration; | ||
using OrchardCore.Email; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public static class OrchardCoreBuilderExtensions | ||
{ | ||
public static OrchardCoreBuilder ConfigureEmailSettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_Email"); | ||
|
||
tenantServices.PostConfigure<SmtpSettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OrchardCore.Modules/OrchardCore.Facebook/Extensions/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using OrchardCore.Environment.Shell.Configuration; | ||
using OrchardCore.Facebook.Settings; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public static class OrchardCoreBuilderExtensions | ||
{ | ||
public static OrchardCoreBuilder ConfigureFacebookSettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_Facebook"); | ||
|
||
tenantServices.PostConfigure<FacebookSettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OrchardCore.Modules/OrchardCore.GitHub/Extensions/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using OrchardCore.Environment.Shell.Configuration; | ||
using OrchardCore.GitHub.Settings; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public static class OrchardCoreBuilderExtensions | ||
{ | ||
public static OrchardCoreBuilder ConfigureGitHubSettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_GitHub"); | ||
|
||
tenantServices.PostConfigure<GitHubAuthenticationSettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OrchardCore.Modules/OrchardCore.Google/Extensions/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using OrchardCore.Environment.Shell.Configuration; | ||
using OrchardCore.Google.Authentication.Settings; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public static class OrchardCoreBuilderExtensions | ||
{ | ||
public static OrchardCoreBuilder ConfigureGoogleSettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_Google"); | ||
|
||
tenantServices.PostConfigure<GoogleAuthenticationSettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...e.Modules/OrchardCore.Microsoft.Authentication/Extensions/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using OrchardCore.Environment.Shell.Configuration; | ||
using OrchardCore.Microsoft.Authentication.Settings; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public static class OrchardCoreBuilderExtensions | ||
{ | ||
public static OrchardCoreBuilder ConfigureMicrosoftAccountSettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_Microsoft_Authentication_MicrosoftAccount"); | ||
|
||
tenantServices.PostConfigure<MicrosoftAccountSettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
|
||
public static OrchardCoreBuilder ConfigureAzureADSettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_Microsoft_Authentication_AzureAD"); | ||
|
||
tenantServices.PostConfigure<AzureADSettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OrchardCore.Modules/OrchardCore.ReverseProxy/Extensions/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using OrchardCore.Environment.Shell.Configuration; | ||
using OrchardCore.ReverseProxy.Settings; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public static class OrchardCoreBuilderExtensions | ||
{ | ||
public static OrchardCoreBuilder ConfigureReverseProxySettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_ReverseProxy"); | ||
|
||
tenantServices.PostConfigure<ReverseProxySettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OrchardCore.Modules/OrchardCore.Twitter/Extensions/OrchardCoreBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using OrchardCore.Environment.Shell.Configuration; | ||
using OrchardCore.Twitter.Settings; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
public static class OrchardCoreBuilderExtensions | ||
{ | ||
public static OrchardCoreBuilder ConfigureTwitterSettings(this OrchardCoreBuilder builder) | ||
{ | ||
builder.ConfigureServices((tenantServices, serviceProvider) => | ||
{ | ||
var configurationSection = serviceProvider.GetRequiredService<IShellConfiguration>().GetSection("OrchardCore_Twitter"); | ||
|
||
tenantServices.PostConfigure<TwitterSettings>(settings => configurationSection.Bind(settings)); | ||
}); | ||
|
||
return builder; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
# Reverse Proxy (`OrchardCore.ReverseProxy`) | ||
|
||
Enables configuration of hosting scenarios with a reverse proxy, like which HTTP headers to forward. | ||
Enables configuration of hosting scenarios with a reverse proxy, like which HTTP headers to forward. | ||
|
||
## Reverse Proxy Settings Configuration | ||
|
||
The `OrchardCore.ReverseProxy` module allows the user to use configuration values to override the settings configured from the admin area by calling the `ConfigureReverseProxySettings()` extension method on `OrchardCoreBuilder` when initializing the app. | ||
|
||
The following configuration values can be customized: | ||
|
||
```json | ||
"OrchardCore_ReverseProxy": { | ||
"ForwardedHeaders": "None" | ||
} | ||
``` | ||
|
||
For more information please refer to [Configuration](../../core/Configuration/README.md). |
Oops, something went wrong.