Skip to content

Commit

Permalink
fix BE /api on server
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrembecky committed Dec 21, 2024
1 parent 6085041 commit d33bade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/apiAxios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const newApiAxios = (base: 'server' | 'client') => {
// - browser vola lokalnu /api URL
// - na deployed verzii (test.strom.sk, strom.sk) to chyti nginx a posle na deployed BE
// - na localhoste to chyti next middleware, kde to rewritneme na BE URL (podla env vars)
baseURL: base === 'server' ? getBackendServerUrl() : '/api',
baseURL: base === 'server' ? `${getBackendServerUrl()}/api` : '/api',
// auth pozostava z comba:
// 1. `sessionid` httpOnly cookie - nastavuje a maze su server pri login/logout
// 2. CSRF hlavicka - server nastavuje cookie, ktorej hodnotu treba vlozit do hlavicky. axios riesi automaticky podla tohto configu
Expand Down

0 comments on commit d33bade

Please sign in to comment.