Branching vs Global Headers in Xano plugin updates

First off, thank you so much to the WeWeb team for pushing the new updates to the Xano plugins! Being able to control headers is HUGE for creating proper testing environments.

I’m curious—is there any significant difference between using the X-Branch-Header or configuring the X-Branch-Header globally? From what I see, the latter would allow us to bind logic to the header, the former seems more like “hard coding” the branch, but it seems like both can allow you to do the same thing, correct?

Hi, I’m glad it unlock new possibilities for you!

For now the only difference will be for the production value. If you configure it in the Branching section, the production value will be used on our backend to fetch static collection when publishing and fetch the current user when checking if it has access to a given page.

Global headers are only used on the browser side.

Edit : And we want to be able to list the available branch later in the UX if Xano make them available through their API. We asked them if they can add it, same for Data Sources.

On a sidenote, be aware branching has an important limitation for now => Every branch you want to use in WeWeb need to share the same endpoints input as the live branch. Because the configuration of your endpoints will always target the live apispecs you did set on Xano side.

I think the only way to solve that will be if one day we manage to have different configuration by environment for everything in WeWeb. (Or maybe if we add an advanced mode to bind the whole body yourself, but it will still have some limitations)

2 Likes

Understood, thank you, Alexis!