Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CoreX-wg-easy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hendrik Garske
CoreX-wg-easy
Commits
e11dd500
Commit
e11dd500
authored
Dec 27, 2025
by
Hendrik Garske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Erweitere Backend-URL Erkennung mit Docker-internen Service-Namen
parent
adc937e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
wg-api.ts
lib/wg-api.ts
+15
-5
No files found.
lib/wg-api.ts
View file @
e11dd500
...
...
@@ -67,12 +67,22 @@ export class WgApiClient {
private
async
request
<
T
>
(
endpoint
:
string
,
options
:
RequestInit
=
{}):
Promise
<
T
>
{
// Liste möglicher Backend-URLs zum Ausprobieren
// Hinweis: Port 51821 ist der Standard-Port für wg-easy Web-UI
// Wenn beide im gleichen Container laufen, sollte localhost funktionieren
// In Docker: Wenn Services als separate Container laufen, verwenden sie interne Docker-Namen
// In CapRover: Services haben Namen wie srv-captain--<app-name>
// Wenn beide im gleichen Container laufen, funktioniert localhost
const
possibleUrls
=
[
this
.
baseUrl
,
// Zuerst die konfigurierte URL versuchen (Standard: localhost:51821)
'http://localhost:51821'
,
// Standard für gleichen Container
'http://127.0.0.1:51821'
,
// Alternative localhost-Variante
this
.
baseUrl
,
// Zuerst die konfigurierte URL versuchen
// Versuche interne Docker-Namen (für separate Container im gleichen Netzwerk)
'http://wg-easy:51821'
,
'http://wg-easy-backend:51821'
,
'http://backend:51821'
,
// Versuche CapRover Service-Namen (wenn als separate Services)
'http://srv-captain--wg-easy:51821'
,
'http://srv-captain--wg-easy-backend:51821'
,
'http://srv-captain--corex-wg-easy:51821'
,
// Versuche localhost (wenn beide im gleichen Container)
'http://localhost:51821'
,
'http://127.0.0.1:51821'
,
]
let
lastError
:
Error
|
null
=
null
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment