Skip to content

css/js loaded at any protocol case #557

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 26, 2016
Merged

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
Owner

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
Owner

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 barryvdh: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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants