diff --git a/desktop/flipper-server-core/src/utils/certificateUtils.tsx b/desktop/flipper-server-core/src/utils/certificateUtils.tsx index 682b587e0..c665e25d3 100644 --- a/desktop/flipper-server-core/src/utils/certificateUtils.tsx +++ b/desktop/flipper-server-core/src/utils/certificateUtils.tsx @@ -271,8 +271,12 @@ const getStaticFilePath = (filename: string): string => { const tokenFilename = 'auth.token'; const getTokenPath = (): string => { - const path = getStaticFilePath(tokenFilename); - return path; + const config = getFlipperServerConfig(); + if (config.environmentInfo.isHeadlessBuild) { + return getStaticFilePath(tokenFilename); + } + + return getFilePath(tokenFilename); }; export const generateAuthToken = async () => {