راهنما:$wgForceHTTPS

From mediawiki.org
This page is a translated version of the page Manual:$wgForceHTTPS and the translation is 63% complete.
آدرس‌های سرور و مسیرهای فایل: $wgForceHTTPS
درخواست‌های HTTP ناامن را به HTTPS هدایت کنید.
معرفی شده در نسخه:1.34.3 (Gerrit change 608504; git #c75eef91)
حذف شده در نسخه:هنوز در حال استفاده است
مقادیر مجاز:(boolean)
مقدار پیش‌فرض:false (gerrit:608504, gerrit:612497, gerrit:615840)

جزئیات

اگر این تنظیم درست است، وقتی یک درخواست HTTP ناامن دریافت می‌شود، همیشه به HTTPS هدایت شوید. This overrides and disables the preferhttps user preference, and it overrides $wgSecureLogin and the CanIPUseHTTPS hook.

$wgServer may be either https or protocol-relative. If $wgServer starts with "http://", an exception will be thrown.

اگر از یک پروکسی معکوس یا CDN برای ارسال درخواست‌ها از HTTPS به HTTP استفاده شود، سرصفحه درخواست "X-Forwarded-Proto: https" باید برای سرکوب تغییر مسیر ارسال شود.

In addition to setting this to true, for optimal security, the webserver should also be configured to send HTTP Strict Transport Security (HSTS) response headers.

When $wgForceHTTPS is set to false, HTTP/HTTPS preference is tracked on a per-user basis, by a combination of:

  • اولویت کاربر 1$
  • کوکی forceHTTPS و فراداده جلسه (در دسترس از طریق Session::shouldForceHTTPS())
  • روش PHP Session::setForceHTTPS()


در دسترس بودن

این متغیر در MediaWiki 1.35.0 (gerrit:608504) اضافه شده است. به عنوان بخشی از نسخه MediaWiki 1.34.3 (gerrit:612497) به 1.34 و همچنین به عنوان بخشی از نسخه MediaWiki 1.31.9 (gerrit:615840) به 1.31 گزارش شد.

جستارهای وابسته