I think I almost found a way to do true multiple domains on one bubble app but having one bug I need help with. I have a working test app to show you guys.
I am using reverse proxy (instead of a iframe).
What I got working:
Adding multiple domains to a bubble app without using iframes (I use netlify reverse proxy)
People can search, add and remove things from the database
I need to read up on exactly what reverse proxying is but here are my thoughts on the issues you’re facing.
The issue with the login cookie not working is likely associated with anti-Cross Site Scripting measures Bubble has in place. As you know, Bubble will need to tweak this behavior in order to get white labelled sites working this way. That said, I guess you said that the issue doesn’t really appear when on the free domain provided by Bubble. So I am really curious to know why the behavior changes when on a custom domain, and if Bubble actually has wiggle room to modify this behavior for custom domains.
On another note, ideally your proposed solution is one that can be setup/driven from within Bubble itself (rather than needing to involve a Bubble developer to configure some portion of a white label every time a new one is needed). Is that possible?
Also, I wonder if someone from the Netlify community would have a useful insight for your here.
Also, is there no way for javascript to check which cookies where blocked and conditionally set them (as you did by manually copying and pasting from within the developer tab)?
update
Obviously javascript can’t enable cookies - that’s a power reserved only for the browser, but as long as cookies are enabled, is there a way for JS to check which one’s were blocked by the browser. I can’t seem to find info on this with a quick google search. Maybe you will have better luck!
Thanks for brainstorming. Netlify isnt allowing for modifing of headers. I am now trying to build the reverse proxy as a node.js script. See if I can modify headers.
I was thinking maybe it would work if i rewrite all bubble workflow paths to the original domain inside the html/js. First i try to only rewrite the domain inside the cookie.
I get a problem when I login bubble gives me a 1603747634514x395352877241044860 error. When I refresh I am logged in and everything seems to work. Hopefully bubble can fix this bug.