Share feedback, ideas and get community help

Updated 6 days ago

Does typebot runs on path other than root?

Hi folks, I'd like to have typebot builder and viewer running under a different path other than root.
I've tried to set NEXTAUTH_URL=https://typebot.mydomain.com/builder and NEXT_PUBLIC_VIEWER_URL=https://typebot.mydomain.com/viewer.
Should this work?
When I try to access this kind of url I'm always being redirect to root , for example to https://typebot.mydomain.com/signin instead of https://typebot.mydomain.com/builder/signin.
Am I missing something or typebot requires to run on the root folder of the domain?
B
e
4 comments
It should only work if you have a reverse proxy detecting that path and redirecting to the right resource
Hi @Baptiste I'm using traefik to redirect to the proper service. In this environment we have a couple of web applications and typebot is one of them. I was inspecting the Signin page HTML and it seems that all src is based on the root path (/) and therefore it hits another service instead of typebot's service. Shouldn't those src urls be built with NEXTAUTH_URL and NEXT_PUBLIC_VIEWER_URL instead of just / ?
Plain Text
        <script src="/__ENV.js"></script>
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
        <link rel="preload" href="/_next/static/css/b726bb3848fa3264.css" as="style"/>
        <link rel="stylesheet" href="/_next/static/css/b726bb3848fa3264.css" data-n-g=""/>
        <noscript data-n-css=""></noscript>
        <script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script>
        <script src="/_next/static/chunks/webpack-0edadb8dffd10eef.js" defer=""></script>
        <script src="/_next/static/chunks/framework-a32fdada02556615.js" defer=""></script>
        <script src="/_next/static/chunks/main-ce431f564a1b86d7.js" defer=""></script>
        <script src="/_next/static/chunks/pages/_app-dd69e524bb0b6653.js" defer=""></script>
        <script src="/_next/static/chunks/pages/_error-4c39e7884ce61774.js" defer=""></script>
        <script src="/_next/static/Tg_u7ohHBqmkKicqPtBUx/_buildManifest.js" defer=""></script>
        <script src="/_next/static/Tg_u7ohHBqmkKicqPtBUx/_ssgManifest.js" defer=""></script>
the NextAuth urls also seem to point to root, ie they redirect to /signin and /register instead of ${NEXTAUTH_URL}/signin or ${NEXTAUTH_URL}/register. Could I be missing some configuration?
Yeah no you are right, these variables are really meant to not have a path πŸ™
Add a reply
Sign up and join the conversation on Discord
","upvoteCount":0,"dateCreated":"2024-12-02T16:03:16.307Z","datePublished":"2024-12-02T16:03:16.307Z","dateModified":"2024-12-02T16:03:16.307Z","url":"https://community.typebot.io/does-typebot-runs-on-path-other-than-root-5bRqzSFps8jZ#178d46f2-34cf-4f38-8cc0-7be7864ac86b","author":{"@type":"Person","url":"https://community.typebot.io/members/b7cd1dc9-cb41-49c5-be33-19d603ce5f57","name":"ericchaves","identifier":"b7cd1dc9-cb41-49c5-be33-19d603ce5f57","image":"https://cdn.discordapp.com/embed/avatars/4.png"}},{"@type":"Answer","text":"the NextAuth urls also seem to point to root, ie they redirect to /signin and /register instead of ${NEXTAUTH_URL}/signin or ${NEXTAUTH_URL}/register. Could I be missing some configuration?","upvoteCount":0,"dateCreated":"2024-12-02T18:01:13.882Z","datePublished":"2024-12-02T18:01:13.882Z","dateModified":"2024-12-02T18:01:13.882Z","url":"https://community.typebot.io/does-typebot-runs-on-path-other-than-root-5bRqzSFps8jZ#37a8313d-3fc5-492d-9821-695e31e48d1d","author":{"@type":"Person","url":"https://community.typebot.io/members/b7cd1dc9-cb41-49c5-be33-19d603ce5f57","name":"ericchaves","identifier":"b7cd1dc9-cb41-49c5-be33-19d603ce5f57","image":"https://cdn.discordapp.com/embed/avatars/4.png"}},{"@type":"Answer","text":"Yeah no you are right, these variables are really meant to not have a path πŸ™","upvoteCount":0,"dateCreated":"2024-12-05T16:58:04.671Z","datePublished":"2024-12-05T16:58:04.671Z","dateModified":"2024-12-05T16:58:13.232Z","url":"https://community.typebot.io/does-typebot-runs-on-path-other-than-root-5bRqzSFps8jZ#03af4c39-48ff-4b28-9843-95cd9a2404cc","author":{"@type":"Person","url":"https://community.typebot.io/members/589d2b28-a111-4f02-a228-ad757d0e0112","name":"Baptiste","identifier":"589d2b28-a111-4f02-a228-ad757d0e0112","image":"https://cdn.discordapp.com/avatars/621241109913403395/6fd7e5e4b8bca7e84d2c0bbdf9906a08.webp?size=256"}}]}}