Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.3.1] - 2026-05-27

### Fixed
- Detect AJAX requests in maintenance mode via the `X-AJAX-HANDLER` header (introduced in OctoberCMS 4.1) in addition to the legacy `X-OCTOBER-REQUEST-HANDLER` header.

## [2.3.0] - 2025-07-03

### Added
Expand Down
7 changes: 6 additions & 1 deletion classes/MaintenanceResponder.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ public function __construct(
public function getResponse(): Response
{
if ($this->request->ajax()) {
if ($this->request->hasHeader('X-OCTOBER-REQUEST-HANDLER')) {
// X-AJAX-HANDLER: OctoberCMS 4.1+ (Larajax).
// X-OCTOBER-REQUEST-HANDLER: OctoberCMS <= 4.0 (legacy, kept for backwards compatibility).
if (
$this->request->hasHeader('X-AJAX-HANDLER')
|| $this->request->hasHeader('X-OCTOBER-REQUEST-HANDLER')
) {
return $this->responseFactory->make(
$this->translator->trans('vdlp.maintenance::lang.responses.ajax.message'),
config('vdlp_maintenance.http_status_code_ajax', self::HTTP_STATUS_CODE)
Expand Down
1 change: 1 addition & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ v2.1.2: "Add .gitattributes file to plugin repository"
v2.2.0: "Maintenance release (see CHANGELOG.md)"
v2.2.1: "Maintenance release (see CHANGELOG.md)"
v2.3.0: "Add statuscode configuration & support for October CMS 4 -- See CHANGELOG.md for details."
v2.3.1: "Detect AJAX requests via X-AJAX-HANDLER header (OctoberCMS 4.1) -- See CHANGELOG.md for details."
Loading