定制 ecrmnn/laravel-https 二次开发

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

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

ecrmnn/laravel-https

最新稳定版本:1.0.7

Composer 安装命令:

composer require ecrmnn/laravel-https

包简介

Force HTTPS in your Laravel application

README 文档

README

Generate HTTPS-links and redirect all requests to HTTPS. Also works with load balancing, AWS, Heroku and other services

Installation

Add to your project using Composer
composer require ecrmnn/laravel-https
Add under providers in config/app.php
\Ecrmnn\LaravelHttps\Providers\ServiceProvider::class,
Add under $middleware in app/Http/Kernel.php
\Ecrmnn\LaravelHttps\Http\Middleware\ForceHttps::class,

Usage

Set environment variable

HTTPS will only be forced when env('HTTPS') is set to true

HTTPS=true

What is this?

Generate HTTPS-links automagically

LaravelHTTPS forces the URL scheme in Laravel to use the HTTPS prefix for all links generated using url() and route(). That mean that all your links can be converted to use HTTPS just by installing LaravelHTTPS

Force redirect HTTP to HTTPS

With the middleware included; ForceHttps, you can simply specify that as a global middleware and all requests will be redirected correctly when accessing a non-HTTPS URL.

Requirements

  • Laravel 5.0 +
  • PHP 7 +

License

MIT © Daniel Eckermann

统计信息

  • 总下载量: 145.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 61
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 60
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-18