...
 
Commits (1)
......@@ -82,6 +82,10 @@ void __fastcall TWebCfgDlg::FormShow(TObject *Sender)
TlsEnableCheckBox->Checked = true;
else
TlsEnableCheckBox->Checked = false;
if(MainForm->web_startup.options&WEB_OPT_HSTS_SAFE)
HSTSEnableCheckBox->Checked = true;
else
HSTSEnableCheckBox->Checked = false;
AuthTypesEdit->Text = AnsiString(MainForm->web_startup.default_auth_list);
HtmlRootEdit->Text=AnsiString(MainForm->web_startup.root_dir);
......@@ -135,6 +139,10 @@ void __fastcall TWebCfgDlg::OKBtnClick(TObject *Sender)
MainForm->web_startup.options |= WEB_OPT_ALLOW_TLS;
else
MainForm->web_startup.options &= ~WEB_OPT_ALLOW_TLS;
if(HSTSEnableCheckBox->Checked)
MainForm->web_startup.options |= WEB_OPT_HSTS_SAFE;
else
MainForm->web_startup.options &= ~WEB_OPT_HSTS_SAFE;
SAFECOPY(MainForm->web_startup.default_auth_list
,AuthTypesEdit->Text.c_str());
......@@ -281,6 +289,7 @@ void __fastcall TWebCfgDlg::TlsEnableCheckBoxClick(TObject *Sender)
TlsInterfaceLabel->Enabled = enabled;
TlsPortEdit->Enabled = enabled;
TlsPortLabel->Enabled = enabled;
HSTSEnableCheckBox->Enabled = enabled;
}
//---------------------------------------------------------------------------
......@@ -25,8 +25,8 @@ object WebCfgDlg: TWebCfgDlg
Top = 3
Width = 278
Height = 199
ActivePage = HttpTabSheet
TabIndex = 2
ActivePage = TlsTabSheet
TabIndex = 1
TabOrder = 0
object GeneralTabSheet: TTabSheet
Caption = 'General'
......@@ -200,6 +200,17 @@ object WebCfgDlg: TWebCfgDlg
ShowHint = True
TabOrder = 2
end
object HSTSEnableCheckBox: TCheckBox
Left = 148
Top = 10
Width = 119
Height = 20
Hint = 'HTTP Strict Transport Security'
Caption = 'HSTS Support'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
end
object HttpTabSheet: TTabSheet
Caption = 'HTTP'
......
......@@ -108,6 +108,7 @@ __published: // IDE-managed Components
TEdit *TlsPortEdit;
TLabel *AuthTypesLabel;
TEdit *AuthTypesEdit;
TCheckBox *HSTSEnableCheckBox;
void __fastcall FormShow(TObject *Sender);
void __fastcall AnswerSoundButtonClick(TObject *Sender);
void __fastcall HangupSoundButtonClick(TObject *Sender);
......