Skip to content

css/js loaded at any protocol case#557

Merged
barryvdh merged 1 commit intofruitcake:masterfrom
ysugimoto:master
Oct 26, 2016
Merged

css/js loaded at any protocol case#557
barryvdh merged 1 commit intofruitcake:masterfrom
ysugimoto:master

Conversation

@ysugimoto
Copy link

Debugbar doesn't working in under the HTTPS-HTTP reverse-proxy.

For example,

HTTPS (AWS ELB) ->HTTP (Laravel)

In this case, browser blocked debugbar's css and js on different protocol between https and http.
So, remove protocol prefix at loading css and js, it will success to load these assets.

@barryvdh
Copy link
Member

You should set up your trusted proxies correctly probably, so Laravel will generate proper URLs with the correct scheme.

@ysugimoto
Copy link
Author

@barryvdh Yes, Laravel will generate proper URLs. But In my environment, HTTPS connection handles AWS ELB, and transport to EC2 working Laravel (with Apache HTTP) on inside networks.

At this time, Laravel generates http:// URL on route() function, perhaps because of Request::isSecure() returns false. for that reason, browser connecting with https url, but Laravel generated url is http.

In any case, css and js loading path is starting with //, no write ptotocols, I think that there is no need to worry about protocols. What do you think about it?

@barryvdh
Copy link
Member

I think I'd rather rely on Laravel behavior, but I get the point.
Did you try https://github.com/fideloper/TrustedProxy to fix all your route() calls?

@barryvdh barryvdh merged commit b977458 into fruitcake:master Oct 26, 2016
erikn69 added a commit to erikn69/laravel-debugbar that referenced this pull request Mar 5, 2024
@erikn69 erikn69 mentioned this pull request Mar 5, 2024
barryvdh pushed a commit that referenced this pull request Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants