mirror of
https://github.com/koel/koel.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #255] Base URL / Reverse proxy issue, Last.fm callback #189
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Beanow on GitHub (Mar 2, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/255
Previously I've submitted some PRs and suggestions regarding this on v1.x.
I've upgraded to v2.1.0 and the issue still persists.
To reproduce:
Expected result:
Actual result:
In my case the external URL is http://music.example.com/ and the internal one is http://10.10.10.123/.
The reverse proxy is an apache one configured with:
One solution that worked very effectively for me was #165 which added a middleware and configuration value to support X-Forwarded-* for trusted proxies. It allowed me to add this to my
.envfile to fix the issue.@phanan commented on GitHub (Mar 17, 2016):
Sorry for late reply. I'll try to find some time for the setup and test the issue.
@DeviantEng commented on GitHub (Jun 7, 2016):
I'm not sure if this is relevant to Laravel 5, or not, but on other Laravel 4.x applications (specifically, https://github.com/twostairs/paperwork), I had to add 2 lines to the routes.php file:
URL::forceSchema('https');was needed because my app ran locally as HTTP, but my reverse proxy (Nginx) terminated my https for me.Again, not sure if any behavior changed in Laravel 5.x (koel is based on 5.x, right?), but I will be testing this out here soon.
I just got koel up and running on a CentOS 7 LXC with php7 and once I get my full library scanned, I will be testing it out with my reverse proxy setup.
@DeviantEng commented on GitHub (Jun 7, 2016):
Follow up;
Just adding an entry in Nginx for reverse proxy did not working. Adding those above two lines into my routes.php, my reverse proxy is working as expected. Last.FM scrobbling is also working.
Nginx conf on my koel box:
On my reverse proxy sever running Nginx (separate server):
Hope that can be of some help!
@Porco-Rosso commented on GitHub (Jan 25, 2017):
@DeviantEng I have been having troubles getting https working as well. Now that routes.php is no longer there in Master, where should I insert
URL::forceSchema('https');?Thanks!
@DeviantEng commented on GitHub (Jan 27, 2017):
@Porco-Rosso Sorry, but I don't have a clue. I ran into some other issues with Koel and just gave in and started using Plex for music.
@abba23 commented on GitHub (Apr 26, 2018):
If anyone else still has this problem, I got it working by adding the two lines like this:
Note that the function URL::forceSchema is now called URL::forceScheme in the latest version.
@xordspar0 commented on GitHub (Sep 10, 2018):
https://github.com/phanan/koel/issues/681 is a duplicate of this. Some users there suggest a configurable environment variable that allows forcing the base URL to use https://.
@phanan Do you think this is a good solution? Would you accept a patch that implements this?
@phanan commented on GitHub (May 18, 2019):
Closing via
488854127a.