diff --git a/config/.env.example b/config/.env.example
index 300eed2378..c3aa657064 100644
--- a/config/.env.example
+++ b/config/.env.example
@@ -24,7 +24,6 @@ export INSTALL_MODE="true"
export USE_DEBUG_KIT="false"
export SITE_URL="https://localhost/"
export SSL_URL="https://localhost/"
-export ADMIN_SSL="true"
export ADMIN_PREFIX="admin"
export BASER_CORE_PREFIX="baser"
export SQL_LOG="false"
diff --git a/plugins/baser-core/config/setting.php b/plugins/baser-core/config/setting.php
index 1128f5ccc5..3d05bde08c 100644
--- a/plugins/baser-core/config/setting.php
+++ b/plugins/baser-core/config/setting.php
@@ -331,11 +331,6 @@
*/
'passwordRequestAllowTime' => 1440,
- /**
- * 管理画面のSSL
- */
- 'adminSsl' => filter_var(env('ADMIN_SSL', true), FILTER_VALIDATE_BOOLEAN),
-
/**
* エディタ
*/
diff --git a/plugins/baser-core/src/BaserCorePlugin.php b/plugins/baser-core/src/BaserCorePlugin.php
index aa49ab0beb..4c74a8b2de 100644
--- a/plugins/baser-core/src/BaserCorePlugin.php
+++ b/plugins/baser-core/src/BaserCorePlugin.php
@@ -288,14 +288,6 @@ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue
->add(new BcFrontMiddleware())
->add(new BcRedirectSubSiteMiddleware());
- if (Configure::read('BcApp.adminSsl') && !BcUtil::isConsole() && BcUtil::isAdminSystem() && BcUtil::isInstalled()) {
- $config = ['redirect' => false];
- if(filter_var(env('TRUST_PROXY', false))) {
- $config['trustedProxies'] = !empty($_SERVER['HTTP_X_FORWARDED_FOR'])? [$_SERVER['HTTP_X_FORWARDED_FOR']] : [];
- }
- $middlewareQueue->add(new HttpsEnforcerMiddleware($config));
- }
-
// APIへのアクセスの場合、セッションによる認証以外は、CSRFを利用しない設定とする
$ref = new ReflectionClass($middlewareQueue);
$queue = $ref->getProperty('queue');
diff --git a/plugins/baser-core/src/Model/Table/SiteConfigsTable.php b/plugins/baser-core/src/Model/Table/SiteConfigsTable.php
index 7f94263ec4..bd497be7b1 100755
--- a/plugins/baser-core/src/Model/Table/SiteConfigsTable.php
+++ b/plugins/baser-core/src/Model/Table/SiteConfigsTable.php
@@ -77,8 +77,6 @@ public function validationDefault(Validator $validator): Validator
*/
public function validationKeyValue(Validator $validator): Validator
{
- $validator->setProvider('siteConfig', 'BaserCore\Model\Validation\SiteConfigValidation');
-
$validator
->scalar('email')
->email('email', 255, __d('baser_core', '管理者メールアドレスの形式が不正です。'))
@@ -91,14 +89,6 @@ public function validationKeyValue(Validator $validator): Validator
->scalar('ssl_url')
->regex('ssl_url', '/^(http|https):/', __d('baser_core', 'WebサイトURLはURLの形式を入力してください。'))
->notEmptyString('ssl_url', __d('baser_core', 'WebサイトURLを入力してください。'));
- $validator
- ->scalar('admin_ssl')
- ->add('admin_ssl', [
- 'adminSSlSslUrlExists' => [
- 'rule' => 'sslUrlExists',
- 'provider' => 'siteConfig',
- 'message' => __d('baser_core', '管理画面をSSLで利用するには、SSL用のWebサイトURLを入力してください。')
- ]]);
return $validator;
}
diff --git a/plugins/baser-core/src/Model/Validation/SiteConfigValidation.php b/plugins/baser-core/src/Model/Validation/SiteConfigValidation.php
deleted file mode 100644
index 374a781b2f..0000000000
--- a/plugins/baser-core/src/Model/Validation/SiteConfigValidation.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- * Copyright (c) NPO baser foundation
サーバがSSLに対応していない場合、管理システムを表示する事ができなくなってしまいますのでご注意ください。
もし、表示する事ができなくなってしまった場合は、 /app/Config/install.php の、 BcEnv.sslUrl の値を調整するか、BcApp.adminSsl の値を false に書き換えて復旧してください。'),
- 'confirmMessage2' => __d('baser_core', 'テストメールを送信します。いいですか?'),
+ 'alertMessage1' => __d('baser_core', 'テストメールの送信に失敗しました。'),
+ 'confirmMessage1' => __d('baser_core', 'テストメールを送信します。よろしいですか?'),
'infoMessage1' => __d('baser_core', 'テストメールを送信しました。'),
'confirmTitle1' => __d('baser_core', '管理システムSSL設定確認')
], ['escape' => false]);
-$this->BcBaser->js('admin/site_configs/index.bundle', false, ['id' => 'AdminSiteConfigsFormScript',
- 'data-isAdminSsl' => (string)$siteConfig->admin_ssl
-]);
+$this->BcBaser->js('admin/site_configs/index.bundle', false);
?>
@@ -139,25 +135,6 @@
- BcAdminForm->label('admin_ssl', __d('baser_core', '管理画面SSL設定')) ?> - | -
- BcAdminForm->control('admin_ssl', [
- 'type' => 'radio',
- 'options' => $this->BcText->booleanDoList(__d('baser_core', 'SSL通信を利用')),
- 'separator' => ' ',
- 'legend' => false,
- 'disabled' => !$isWritableEnv
- ]) ?>
-
-
- また、SSL用のWebサイトURLの指定が必要です。') ?>
-
- BcAdminForm->error('admin_ssl') ?>
- |
-
---|---|
BcAdminForm->label('admin_list_num', __d('baser_core', '管理画面テーマ')) ?>
diff --git a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js
index ae40ea2512..1c3c41bba4 100644
--- a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js
+++ b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js
@@ -7,5 +7,5 @@
* @since 5.0.0
* @license https://basercms.net/license/index.html MIT License
*/
-$((function(){var e=$("#AdminSiteConfigsFormScript").attr("data-isAdminSsl");function n(){"BaserCore.BcCkeditor"===$('input[name="editor"]:checked').val()?$(".ckeditor-option").show():$(".ckeditor-option").hide()}$("#BtnSave").click((function(){if(!function(e){return"0"!==e||"1"!==$("input[name='admin_ssl']:checked").val()||($("#SiteConfigSslUrl").val()?($.bcConfirm.show({title:bcI18n.confirmTitle1,message:bcI18n.confirmMessage1,defaultCancel:!0,ok:function(){$.bcUtil.showLoader(),$("#SiteConfigFormForm").submit()}}),!1):(alert(bcI18n.alertMessage1),window.location.hash="ssl-url",!1))}(e))return!1;$.bcUtil.showLoader()})),$('input[name="editor"]').click(n),n(),$("#BtnCheckSendmail").click((function(){return!!confirm(bcI18n.confirmMessage2)&&($.bcToken.check((function(){return $.ajax({type:"POST",url:$.bcUtil.apiAdminBaseUrl+"baser-core/site_configs/check_sendmail.json",data:$("#SiteConfigFormForm").serialize(),beforeSend:function(){$("#ResultCheckSendmail").hide(),$("#AjaxLoaderCheckSendmail").show()},success:function(e){$("#ResultCheckSendmail").html(bcI18n.infoMessage1)},error:function(e,n,i){var o="";o=e.responseJSON.message?e.responseJSON.message:i,$("#ResultCheckSendmail").html(bcI18n.alertMessage2+o)},complete:function(){$("#ResultCheckSendmail").show(),$("#AjaxLoaderCheckSendmail").hide()}})}),{loaderType:"none"}),!1)}))}));
+$((function(){function e(){"BaserCore.BcCkeditor"===$('input[name="editor"]:checked').val()?$(".ckeditor-option").show():$(".ckeditor-option").hide()}$("#BtnSave").click((function(){$.bcUtil.showLoader()})),$('input[name="editor"]').click(e),e(),$("#BtnCheckSendmail").click((function(){return!!confirm(bcI18n.confirmMessage1)&&($.bcToken.check((function(){return $.ajax({type:"POST",url:$.bcUtil.apiAdminBaseUrl+"baser-core/site_configs/check_sendmail.json",data:$("#SiteConfigFormForm").serialize(),beforeSend:function(){$("#ResultCheckSendmail").hide(),$("#AjaxLoaderCheckSendmail").show()},success:function(e){$("#ResultCheckSendmail").html(bcI18n.infoMessage1)},error:function(e,n,i){var c="";c=e.responseJSON.message?e.responseJSON.message:i,$("#ResultCheckSendmail").html(bcI18n.alertMessage1+c)},complete:function(){$("#ResultCheckSendmail").show(),$("#AjaxLoaderCheckSendmail").hide()}})}),{loaderType:"none"}),!1)}))}));
//# sourceMappingURL=index.bundle.js.map
\ No newline at end of file
diff --git a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map
index 43df226151..f6ac1efb2c 100644
--- a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map
+++ b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"js/admin/site_configs/index.bundle.js","mappings":";;;;;;;;;AAUAA,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admin/site_configs/index.js"],"sourcesContent":["/**\n * baserCMS : Based Website Development Project |