定制 14four/laravel-force-https 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

14four/laravel-force-https

Composer 安装命令:

composer require 14four/laravel-force-https

包简介

Force HTTPs for domains

README 文档

README

Installation

  1. Require Laravel Force HTTPS with composer.
composer require 14four/laravel-force-https
  1. Open your config/app.php and add the following to the providers array:

note: Laravel > 5.5 skip this step

FourteenFour\ForceHttps\ForceHttpsServiceProvider::class,
  1. Publish Config
php artisan vendor:publish --provider="FourteenFour\ForceHttps\ForceHttpsServiceProvider"
  1. Add middleware to kernel.php
\FourteenFour\ForceHttps\Middleware\ForceHttps::class,

note: this should probably be added to the 'web' middleware

Config

Open the config/forcehttps.php configuration file to customize the config.

Enable

enable will allow you to turn on and off the force HTTPS functionality of the middleware.

By default this uses the environment variable FORCE_HTTPS.

Use the following to disable the force HTTPS functionality.

FORCE_HTTPS=false

Except

This will allow you to provide regex patterns that will be excluded from the force HTTPS functionality.

Example:

$except = [
  '14four.com',
],

Keep in mind this will match the fullUrl not just the domain. The example above will match http://14four.com and http://example.com/post?14four.com

统计信息

  • 总下载量: 628
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固