Added configurable return url
This commit is contained in:
parent
779bad518b
commit
79b735f507
4 changed files with 10 additions and 2 deletions
|
@ -77,7 +77,7 @@ namespace ContactForm
|
|||
}
|
||||
|
||||
Log.CloseAndFlush();
|
||||
return new { location = "https://www.alexhyett.com" };
|
||||
return new { location = _appSettings.ReturnUrl };
|
||||
}
|
||||
|
||||
private void ConfigureServices(IServiceCollection serviceCollection)
|
||||
|
|
|
@ -2,6 +2,7 @@ namespace ContactForm
|
|||
{
|
||||
public class AppSettings
|
||||
{
|
||||
public string ReturnUrl { get; set; }
|
||||
public string EmailFrom { get; set; }
|
||||
public string EmailTo { get; set; }
|
||||
public string Host { get; set; }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"App": {
|
||||
"ReturnUrl": "http://www.example.com",
|
||||
"EmailFrom": "sender@example.com",
|
||||
"EmailTo": "hello@example.com",
|
||||
"Host": "smtp.example.com",
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
{
|
||||
"App": {
|
||||
"Prefix": "Test"
|
||||
"ReturnUrl": "http://www.example.com",
|
||||
"EmailFrom": "sender@example.com",
|
||||
"EmailTo": "hello@example.com",
|
||||
"Host": "smtp.example.com",
|
||||
"Port": 465,
|
||||
"Username": "email-username",
|
||||
"Password": "email-password"
|
||||
},
|
||||
"Serilog": {
|
||||
"Using": ["Serilog.Sinks.Seq"],
|
||||
|
|
Loading…
Reference in a new issue