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?
4 Replies
Hall
Hall5mo ago
Someone will reply to you shortly. In the meantime, this might help:
Baptiste
Baptiste5mo ago
It should only work if you have a reverse proxy detecting that path and redirecting to the right resource
ericchaves
ericchavesOP5mo ago
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 / ?
<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>
<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?
Baptiste
Baptiste5mo ago
Yeah no you are right, these variables are really meant to not have a path 🙏

Did you find this page helpful?