mirror of
https://github.com/koel/koel.git
synced 2026-04-25 08:46:00 +03:00
[PR #1797] [MERGED] feat: implement and use new confg key for trusted hosts #1875
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#1875
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?
📋 Pull Request Information
Original PR: https://github.com/koel/koel/pull/1797
Author: @MichaIng
Created: 7/16/2024
Status: ✅ Merged
Merged: 7/16/2024
Merged by: @phanan
Base:
master← Head:trusted-hosts📝 Commits (1)
a9673d9feat: implement and use new confg key for trusted hosts📊 Changes
3 files changed (+19 additions, -3 deletions)
View changed files
📝
.env.example(+5 -0)📝
app/Http/Middleware/TrustHosts.php(+1 -3)📝
config/app.php(+13 -0)📄 Description
After commit
github.com/koel/koel@e969549, Koel accepts only the hostname fromAPP_URL(and all its sub domains) as trusted hosts, as long as HTTPS is not enforced. This breaks access with.env.example, untilAPP_URLis set, and then allows to define a single trusted host only, which can be a problem instances which one wants to access from localhost, from within LAN via local hostname or IP, and remotely with a public hostname at the same time, or for testing instances.This commit introduces a new config key
TRUSTED_HOSTS. It is empty by default, which permits access via all hostnames, restoring the pre-v7.0.0 behaviour. When definitng it as comma-separated list of hostnames (and/or IPs), access is restricted to those.Fixes: #1796
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.