From 0c23beadccfda6c6e2d6380244fbe49f5bfee139 Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Mon, 24 May 2021 13:30:42 +0200
Subject: API calls uses window.location

---
 src/frontend/components/RepositoryHeader.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/frontend/components/RepositoryHeader.vue')

diff --git a/src/frontend/components/RepositoryHeader.vue b/src/frontend/components/RepositoryHeader.vue
index b0db4f9..b074d15 100644
--- a/src/frontend/components/RepositoryHeader.vue
+++ b/src/frontend/components/RepositoryHeader.vue
@@ -33,7 +33,7 @@ export default {
 
 		watch(() =>
 		{
-			fetch(`http://localhost:1337/api/v1/repos/${props.repository}`)
+			fetch(`${window.location.protocol}//${window.location.host}/api/v1/repos/${props.repository}`)
 				.then((res) => res.json())
 				.then((data) =>
 				{
-- 
cgit v1.2.3-18-g5258

