Skip to content

Commit 8df9187

Browse files
authored
fix: use function for fetchHeaders (#1191)
1 parent 0e33b3b commit 8df9187

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

admin/authentication-support.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import parseHydraDocumentation from "@api-platform/api-doc-parser/lib/hydra/pars
1616
import authProvider from "./authProvider";
1717

1818
const entrypoint = process.env.REACT_APP_API_ENTRYPOINT;
19-
const fetchHeaders = { Authorization: `Bearer ${window.localStorage.getItem("token")}` };
19+
const fetchHeaders = () => ({
20+
Authorization: `Bearer ${window.localStorage.getItem("token")}`,
21+
});
2022
const fetchHydra = (url, options = {}) =>
2123
localStorage.getItem("token")
2224
? baseFetchHydra(url, {

0 commit comments

Comments
 (0)