Всем привет!
Есть проект.
API на Django, фронт на React.
Регистрация, авторизация по JWT токену.
Есть страницы - Home, Login, Register.
После авторизации - Home, Dashboard, Logout.
На локальном и бэк и фронт работают норм.
Регистрируемся и можем переходить на Dashboard.
Также на сервере API на Django работает норм, а вот фронт на сервере как-то не так работает.
Страницы Home, Login, Register работают нормально, но когда после регистрации нового пользователя мы хотим перейти на страницу Dashboard, попадаем на 404.
Тот же фронт, залитый на stackblitz.com, работает как надо.
После авторизации нормально переходим на Dashboard.
Почему на сервере не работает страница Dashboard?
тут код
https://github.com/mk3mk/jwt-react-django-auth-01
вот логи
Failed to load resource: the server responded with a status of 404 ()
и еще логи87.250.224.229 - - [12/Mar/2024:10:52:26 +0300] "GET /register HTTP/1.0" 404 313903 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0"
80.250.85.70 - - [12/Mar/2024:10:58:21 +0300] "GET /dashboard HTTP/1.0" 404 313903 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:21 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:22 +0300] "GET /dashboard HTTP/1.0" 404 313903 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:22 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:23 +0300] "GET /dashboard HTTP/1.0" 404 313903 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:23 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:28 +0300] "GET / HTTP/1.0" 200 1461 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:28 +0300] "GET /manifest.json HTTP/1.0" 200 517 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:42 +0300] "GET / HTTP/1.0" 200 1461 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:10:58:42 +0300] "GET /manifest.json HTTP/1.0" 200 517 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:13:46 +0300] "GET / HTTP/1.0" 200 1461 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:13:46 +0300] "GET /manifest.json HTTP/1.0" 200 517 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:14:02 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:14:02 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:14:10 +0300] "GET /manifest.json HTTP/1.0" 200 517 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:14:26 +0300] "GET / HTTP/1.0" 200 1461 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:14:26 +0300] "GET /manifest.json HTTP/1.0" 200 517 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:20:15 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:20:16 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:20:58 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:20:58 +0300] "GET /dashboard HTTP/1.0" 404 313903 "https://amaranga.ru/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
80.250.85.70 - - [12/Mar/2024:11:20:58 +0300] "GET /favicon.ico HTTP/1.0" 200 3870 "https://amaranga.ru/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36"
194.38.23.16 - - [12/Mar/2024:11:22:01 +0300] "GET /js/elfinder/php/connector.php HTTP/1.1" 301 173 "-" "ALittle Client"
194.38.23.16 - - [12/Mar/2024:11:22:05 +0300] "GET /js/elfinder/php/connector.minimal.php HTTP/1.1" 301 173 "-" "ALittle Client"
194.38.23.16 - - [12/Mar/2024:11:22:11 +0300] "GET /js/elfinder/php/connector.php HTTP/1.0" 404 313903 "-" "ALittle Client"
194.38.23.16 - - [12/Mar/2024:11:22:11 +0300] "GET /js/elfinder/php/connector.minimal.php HTTP/1.0" 404 313903 "-" "ALittle Client"