astro-tractstack 2.0.37 → 2.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-tractstack",
3
- "version": "2.0.37",
3
+ "version": "2.0.39",
4
4
  "description": "Astro integration for TractStack - redeeming the web from boring experiences",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -64,9 +64,9 @@ export async function onRequest(
64
64
  // Strategy 3: Backend Lookup (Fallback)
65
65
  if (!tenantId) {
66
66
  try {
67
- // We assume the backend is always reachable on localhost:8080 in this architecture
67
+ const backendUrl = import.meta.env.PUBLIC_GO_BACKEND;
68
68
  const response = await fetch(
69
- `http://127.0.0.1:8080/api/v1/resolve-domain?host=${encodeURIComponent(hostname)}`
69
+ `${backendUrl}/api/v1/resolve-domain?host=${encodeURIComponent(hostname)}`
70
70
  );
71
71
  if (response.ok) {
72
72
  const data = await response.json();
@@ -1,6 +1,5 @@
1
1
  import type {
2
2
  DiscoverySuggestion,
3
- FTSResult,
4
3
  CategorizedResults,
5
4
  } from '@/types/tractstack';
6
5
 
@@ -30,7 +29,10 @@ function getConfig() {
30
29
  }
31
30
 
32
31
  return {
33
- goBackend: import.meta.env.PUBLIC_GO_BACKEND || 'http://localhost:8080',
32
+ goBackend:
33
+ window.TRACTSTACK_CONFIG?.backendUrl ||
34
+ import.meta.env.PUBLIC_GO_BACKEND ||
35
+ 'http://localhost:8080',
34
36
  tenantId:
35
37
  window.TRACTSTACK_CONFIG?.tenantId ||
36
38
  import.meta.env.PUBLIC_TENANTID ||