[PR #1706] [MERGED] fix(frontend): Fix the base URL supplied to the frontend #1851

Closed
opened 2026-02-26 03:32:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/1706
Author: @kondratovbr
Created: 9/22/2023
Status: Merged
Merged: 9/22/2023
Merged by: @phanan

Base: masterHead: master


📝 Commits (2)

  • a7c5586 Fix the base URL supplied to the frontend
  • 8bea390 Ensure the base URL ends with slash

📊 Changes

2 files changed (+8 additions, -2 deletions)

View changed files

📝 app/Helpers.php (+6 -0)
📝 resources/views/base.blade.php (+2 -2)

📄 Description

I've encountered an issue when running behind a reverse proxy. Proxy terminates SSL correctly and provides correct X-Forwarded headers, but URLs generated for the frontend aren't https, so it tries to call the API via http which browsers explicitly forbid and throw an error along the lines of ...was not allowed to display insecure content from http://...

This PR fixes the BASE_URL explicitly used in Vue and the URL in <base> tag which may be used implicitly.

Now the "non-working" APP_URL ENV value actually does something.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/1706 **Author:** [@kondratovbr](https://github.com/kondratovbr) **Created:** 9/22/2023 **Status:** ✅ Merged **Merged:** 9/22/2023 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`a7c5586`](https://github.com/koel/koel/commit/a7c5586b7d3f7ebcc57f7cf43b34a5a8d68aab9f) Fix the base URL supplied to the frontend - [`8bea390`](https://github.com/koel/koel/commit/8bea39016fa3b30433854ea77fbb7d8f54c4e094) Ensure the base URL ends with slash ### 📊 Changes **2 files changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `app/Helpers.php` (+6 -0) 📝 `resources/views/base.blade.php` (+2 -2) </details> ### 📄 Description I've encountered an issue when running behind a reverse proxy. Proxy terminates SSL correctly and provides correct `X-Forwarded` headers, but URLs generated for the frontend aren't `https`, so it tries to call the API via `http` which browsers explicitly forbid and throw an error along the lines of `...was not allowed to display insecure content from http://...` This PR fixes the `BASE_URL` explicitly used in Vue and the URL in `<base>` tag which may be used implicitly. Now the "non-working" `APP_URL` ENV value actually does something. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:32:32 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1851
No description provided.