laravel-localization icon indicating copy to clipboard operation
laravel-localization copied to clipboard

Middleware\LocaleSessionRedirect can't handle request url from proxy server , cause https to http

Open spawnash opened this issue 3 years ago • 1 comments

Describe the bug i'm using reverse proxy server to handle ssl and load balance this middleware Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect will handle the url with locale prefix, but at line:51 it will parse url from https to http , i guess the reason is this func parse url from load balance request url not client request url

To Reproduce Steps to reproduce the behavior:

  1. i'm using valet share to reproduce
  2. visit a route without locale prefix
  3. die dump the handled url($redirection) which middleware dose
  4. See error image

image

Expected behavior return correct url

More info:

  • Version of Laravel :5.8
  • Version of the Laravel-localization package:1.3.2
  • Which middleware is used in Route::groups: Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect

spawnash avatar Dec 15 '20 08:12 spawnash

Describe the bug i'm using reverse proxy server to handle ssl and load balance this middleware Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect will handle the url with locale prefix, but at line:51 it will parse url from https to http , i guess the reason is this func parse url from load balance request url not client request url ... hi, did you fixed it? I have the same issue

dsqwared5 avatar Jun 18 '22 12:06 dsqwared5