Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
Fix wrong links (schema or port) generation (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam authored Jan 16, 2020
1 parent 0e8c1ad commit cf8d9c5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].

## v3.0.1

### Fixed

- Wrong links _(server schema or/and port)_ generation (default configuration updated, listeners order is important) (closes [#27])

[#27]:https://github.com/avto-dev/roadrunner-laravel/issues/27

## v3.0.0

### Changed
Expand Down
2 changes: 1 addition & 1 deletion config/roadrunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
Listeners\RebindRouterListener::class,
Listeners\InjectStatsIntoRequestListener::class,
Listeners\BindRequestListener::class,
Listeners\SetServerPortListener::class,
Listeners\ForceHttpsListener::class,
Listeners\SetServerPortListener::class,
],

Events\AfterRequestHandlingEvent::class => [
Expand Down
5 changes: 5 additions & 0 deletions src/Listeners/ForceHttpsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
use AvtoDev\RoadRunnerLaravel\Events\Contracts\WithHttpRequest;
use Illuminate\Contracts\Config\Repository as ConfigRepository;

/**
* This listener must be registered BEFORE `SetServerPortListener` for correct links generation.
*
* @see SetServerPortListener
*/
class ForceHttpsListener implements ListenerInterface
{
/**
Expand Down
5 changes: 5 additions & 0 deletions src/Listeners/SetServerPortListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

use AvtoDev\RoadRunnerLaravel\Events\Contracts\WithHttpRequest;

/**
* This listener must be registered AFTER `ForceHttpsListener` for correct links generation.
*
* @see ForceHttpsListener
*/
class SetServerPortListener implements ListenerInterface
{
/**
Expand Down

0 comments on commit cf8d9c5

Please sign in to comment.