Files
please-pay-me/context/2026-09-13_07-54-00_fix-nginx-api-html-json.md
2026-09-21 04:06:43 +03:00

12 lines
530 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-09-13 — Fix: JSON.parse на фронте
## Симптом
`JSON.parse: unexpected character at line 1 column 1` — в ответ на `/api/budgets` приходил HTML `index.html` (SPA fallback).
## Причина
В `web/nginx.conf` не было `location /api/``try_files` отдавал фронт.
## Исправление
Вернул `proxy_pass http://api:8000` для `/api/`, улучшил разбор ошибок во фронте.
Пересобрать: `docker compose up -d --build web`