Fix: Use relative URL for API requests in admin UI

Changed the  request URL in  from an absolute path
() to a relative path
().

This ensures that the API request is always sent to the same domain
that the admin page is loaded from, resolving CORS and NetworkError
issues when accessing the UI from a production FQDN or a live server
with a different port. This change relies on a correctly configured
reverse proxy in the production environment.
This commit is contained in:
chris 2025-11-12 15:07:05 -05:00
parent b8c8a1a45f
commit 91885d5ff5

View File

@ -77,7 +77,7 @@ document.addEventListener('DOMContentLoaded', () => {
} }
]; ];
fetch('http://localhost:3050/api/update-status', { fetch('/api/update-status', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',