PHPackages                             i9w3b/force-https - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. i9w3b/force-https

ActiveLibrary

i9w3b/force-https
=================

Forçar redirecionamento de http para https usando middleware laravel

04PHP

Since Jun 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/i9w3b/force-https)[ Packagist](https://packagist.org/packages/i9w3b/force-https)[ RSS](/packages/i9w3b-force-https/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

ForceHttps
==========

[](#forcehttps)

[![](https://camo.githubusercontent.com/4002eb66fe93799ef3aaeddba3b6b9c289513c8db505c440a3a83804770fa7d5/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f69397733622f63646e2f696d672f6c6f676f2d32303070782e706e67)](https://github.com/i9w3b)

[![License](https://camo.githubusercontent.com/7867c6e02567cb37dbced96b2b5d4a52b39f2a4f0136aa92fcedbb20befe0d5c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69397733622f666f7263652d6874747073)](https://github.com/i9w3b/force-https/blob/master/LICENSE.md)[![GitHub Language Count](https://camo.githubusercontent.com/76ec49a9f312353fbbe057ceed4b1513efae01daee0253a3b8a43bc332b50869/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f756e742f69397733622f666f7263652d6874747073)](https://github.com/i9w3b/force-https)[![GitHub Repo Size](https://camo.githubusercontent.com/bd94741ead20e74453a5dba8ba52813758e477e552b5fc8f281dee6caf442b58/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f69397733622f666f7263652d6874747073)](https://github.com/i9w3b/force-https)[![GitHub Release](https://camo.githubusercontent.com/47554c7ae43b0eab433aba45a96b1c2b64646eeae9b2f80e09050a18db618b24/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f69397733622f666f7263652d6874747073)](https://github.com/i9w3b/force-https/releases)[![Total Downloads](https://camo.githubusercontent.com/8f8a618b51ed1f9d74b951f7a08da3af7fc6e302a69e5ce9e171b049b82cae02/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f69397733622f666f7263652d68747470732f746f74616c)](https://github.com/i9w3b/force-https)

Forçar redirecionamento de http para https usando middleware

Instalação
----------

[](#instalação)

Execute o seguinte comando:

```
$ composer require i9w3b/force-https
```

Se estiver usando uma versão inferior a 5.5 do Laravel, adicione o provedor de serviços em `config/app.php`:

```
I9W3b\ForceHttps\ForceHttpsServiceProvider::class,
```

##### Opcional

[](#opcional)

```
php artisan vendor:publish --provider="I9W3b\ForceHttps\ForceHttpsServiceProvider"
```

Como Usar
---------

[](#como-usar)

Para redirecionar todas as rotas `http` para o `https` deverá usar o middleware `https`. e adicionar em seu aquivo .env `FORCE_HTTPS=true`. Valor padrão = true.

Portanto, se `FORCE_HTTPS` estiver definido como `true`, isso força o esquema de URL no Laravel a usar o prefixo HTTPS para todos os links gerados.

Exemplo
-------

[](#exemplo)

Usando o middleware `https`

```
Route::group(['middleware' => ['https']], function () {

    Route::get('/', function () {
        return view('welcome');
    });

    /* outras rotas ... */

});
```

Dúvidas/Sugestões
-----------------

[](#dúvidassugestões)

Encontrando erros ou tiver sugestões de melhorias, acesse: [issues](https://github.com/i9w3b/force-https/issues/new)

Licença
-------

[](#licença)

[MIT](https://github.com/i9w3b/force-https/blob/master/LICENSE.md) © [i9W3b](https://github.com/i9w3b)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/69287168?v=4)[i9dev](/maintainers/i9w3b)[@i9w3b](https://github.com/i9w3b)

### Embed Badge

![Health badge](/badges/i9w3b-force-https/health.svg)

```
[![Health](https://phpackages.com/badges/i9w3b-force-https/health.svg)](https://phpackages.com/packages/i9w3b-force-https)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
