I'm hosting Supabase with Kong and using TUS for resumable file uploads. My goal is to ensure that all client-side requests consistently start with https://myhost.com/storage/v1/..., and have Kong handle routing to the correct storage service endpoint without modifying the origin URL across subsequent requests.
My Setup:
I have a Coolify server that is running my Supabase with Kong.
The initial request to
https://myhost.com/storage/v1/upload/resumableroutes correctly to the Supabase storage service, and Kong successfully forwards it.However, the second request changes the origin to
https://myhost.com:8000/upload/resumable/<token>,
My client uppy config:
const supabaseUploadURL = `${process.env.NEXT_PUBLIC_SUPABASE_URL}/storage/v1/upload/resumable`;
const upp = new Uppy({
restrictions:{
allowedFileTypes: ['.pdf', 'application/pdf'],
}
})
.use(Tus, {
endpoint: supabaseUploadURL,
headers: {
authorization: `Bearer ${session.user.supabase_token}`,
},
chunkSize: 6 * 1024 * 1024,
allowedMetaFields: ["bucketName", "objectName", "contentType", "cacheControl"],
});
=> docker compose of the supabase on coolify is the default one
I tried hosting supabase outside of coolify by using nginx but same issue.