Download the PHP package samsonasik/force-https-module without Composer
On this page you can find all versions of the php package samsonasik/force-https-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samsonasik/force-https-module
More information about samsonasik/force-https-module
Files in samsonasik/force-https-module
Package force-https-module
Short Description Force Https Module for Laminas Mvc and Mezzio application
License MIT
Homepage https://github.com/samsonasik/ForceHttpsModule
Informations about the package force-https-module
ForceHttpsModule
Introduction
ForceHttpsModule is a configurable module for force https in your Laminas Mvc and Mezzio Application.
This is README for version ^4.1 which only support Laminas Mvc version 3 and Mezzio version 3 with php ^7.4|~8.0.
For ~4.0.0, you can read at version 4.0.x readme which only support Laminas Mvc version 3 and Mezzio version 3 with php ^7.3|~8.0
For version ^3.0, you can read at version 3 readme which only support Laminas Mvc version 3 and Mezzio version 3 with php ^7.1.
For version ^2.0, you can read at version 2 readme which only support ZF3 and ZF Expressive version 3 with php ^7.1.
For version 1, you can read at version 1 readme which still support ZF2 and ZF Expressive version 1 and 2 with php ^5.6|^7.0 support.
Features
- [x] Enable/disable force https.
- [x] Force Https to All routes.
- [x] Force Https to All routes except exclusion list.
- [x] Force Https to specific routes only.
- [x] Keep headers, request method, and request body.
- [x] Enable/disable HTTP Strict Transport Security Header and set its value.
- [x] Allow add
www.
prefix during redirection from http or already https. - [x] Allow remove
www.
prefix during redirection from http or already https. - [x] Force Https for 404 pages
Installation
1. Require this module uses composer.
2. Copy config
a. For Laminas Mvc application, copy force-https-module.local.php.dist
config to your local's autoload and configure it
source | destination |
---|---|
vendor/samsonasik/force-https-module/config/force-https-module.local.php.dist | config/autoload/force-https-module.local.php |
Or run copy command:
b. For Mezzio application, copy mezzio-force-https-module.local.php.dist
config to your local's autoload and configure it
source | destination |
---|---|
vendor/samsonasik/force-https-module/config/mezzio-force-https-module.local.php.dist | config/autoload/mezzio-force-https-module.local.php |
Or run copy command:
When done, you can modify your local config:
3. Lastly, enable it
a. For Laminas Mvc application
b. For Mezzio application
For mezzio-skeleton ^3.0, you need to open config/pipeline.php
and add:
at the very first pipeline records.
Contributing
Contributions are very welcome. Please read CONTRIBUTING.md