https://github.com/markshust/magento-module-maintenance-key
Magento 2 module to enable maintenance mode viewing by parameter key
https://github.com/markshust/magento-module-maintenance-key
Last synced: 8 months ago
JSON representation
Magento 2 module to enable maintenance mode viewing by parameter key
- Host: GitHub
- URL: https://github.com/markshust/magento-module-maintenance-key
- Owner: markshust
- License: mit
- Created: 2018-01-22T21:41:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-30T13:54:21.000Z (over 8 years ago)
- Last Synced: 2024-12-27T06:26:37.013Z (over 1 year ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MarkShust_MaintenanceKey
Magento module to enable maintenance mode viewing by parameter key.
## Overview
Instead of creating a file at `var/.maintenance.ip` with the list of IP addresses to allow in maintenance mode, instead create a file at `var/.maintenance.key` to allow access by list of allowed keys. This allows developers with dynamic or changing IP addresses to access Magento while the site is in maintenance mode.
## Install
`composer require markoshust/magento-module-maintenance-key`
## Usage
1. Create the file: `./var/.maintenance.key`
2. This file should contain a comma-delimited list of keys, for example:
`67BBB06F-7C54-48E0-A124-44DC22649809,883233B6-8756-460D-A3D2-8C901C21FCE7`
3. If the site contains the file `./var/.maintenance.flag`, the site will be deemed in maintenance mode.
4. The site can now be accessed by appending the `MAINTENANCE_KEY` parameter with a value allowed in the `./var/.maintenance.key` file, for example::
`http://mysite.com/?MAINTENANCE_KEY=67BBB06F-7C54-48E0-A124-44DC22649809`
5. If the `./var/.maintenance.key` file does not exist, maintenance mode viewing will fallback to default methods.
## Extra
Use the [Requestly](https://www.requestly.in/) browser plugin to auto-append the `MAINTENANCE_KEY` parameter to a site's URL.