fixed backend ip

This commit is contained in:
2026-03-25 11:23:24 +01:00
parent 973961e726
commit 99c5871009
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
---
const { path } = Astro.params;
const API_URL = import.meta.env.PUBLIC_API_URL || 'http://localhost:3000';
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
const response = await fetch(`${API_URL}/uploads/${path}`);