mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Added app settings for redirect to HTTPS and use HSTS.
This commit is contained in:
parent
8f06a56540
commit
024f68ba48
@ -1 +1 @@
|
||||
2019.03.20.2311
|
||||
2019.03.23.1213
|
||||
|
||||
@ -20,6 +20,8 @@ namespace Remotely_Server.Services
|
||||
public double DataRetentionInDays => double.Parse(Config["ApplicationOptions:DataRetentionInDays"]);
|
||||
public double RemoteControlSessionLimit => double.Parse(Config["ApplicationOptions:RemoteControlSessionLimit"]);
|
||||
public bool RecordRemoteControlSessions => bool.Parse(Config["ApplicationOptions:RecordRemoteControlSessions"]);
|
||||
public bool RedirectToHTTPS => bool.Parse(Config["ApplicationOptions:RedirectToHTTPS"]);
|
||||
public bool UseHSTS => bool.Parse(Config["ApplicationOptions:RedirectToHTTPS"]);
|
||||
|
||||
public string SmtpHost => Config["ApplicationOptions:SmtpHost"];
|
||||
public int SmtpPort => int.Parse(Config["ApplicationOptions:SmtpPort"]);
|
||||
|
||||
@ -111,8 +111,14 @@ namespace Remotely_Server
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Error");
|
||||
app.UseHsts();
|
||||
app.UseHttpsRedirection();
|
||||
if (bool.Parse(Configuration["ApplicationOptions:UseHSTS"]))
|
||||
{
|
||||
app.UseHsts();
|
||||
}
|
||||
if (bool.Parse(Configuration["ApplicationOptions:RedirectToHTTPS"]))
|
||||
{
|
||||
app.UseHttpsRedirection();
|
||||
}
|
||||
}
|
||||
|
||||
ConfigureStaticFiles(app);
|
||||
|
||||
@ -14,6 +14,8 @@
|
||||
"DBProvider": "SQLite",
|
||||
"AllowSelfRegistration": true,
|
||||
"RecordRemoteControlSessions": false,
|
||||
"RedirectToHTTPS": false,
|
||||
"UseHSTS": false,
|
||||
"DataRetentionInDays": 90,
|
||||
"RemoteControlSessionLimit": 1,
|
||||
"SmtpHost": "",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user