-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document current trailing slash handling mechanisms (#66)
- Loading branch information
1 parent
67e80cc
commit d0005a7
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Insight do toho, co sa deje v DevTools Network tabe a ako robime z FE requesty. Nejake fakty: | ||
- BE django server ocakava requesty s koncovym lomitkom (trailing slash) | ||
- next.js FE nerozlisuje medzi requestami kvoli tomu, ze navstivim nejaku stranku, a tym, ze nieco volam cez axios manualne | ||
- v browseri chceme vidiet URL bez koncoveho lomitka | ||
- next.js server tym padom vracia 308 Redirect na vsetky requesty s koncovym lomitkom a prepise ich takto na bezlomitkove (default spravanie, nastavitelne) | ||
- kedze sa toto deje aj pre manualne requesty na BE, najprv vidime v Network tabe request, z ktoreho next.js odstrani lomitko, no tento request by django server odmietol, preto mame v [`next.config.js`](../next.config.js) definovany "rewrite", ktory to lomitko pridava 😅 |