Add banner ID to probo_consent cookie
Include a `bid` field in the consent cookie so it explicitly identifies which cookie banner it belongs to, making validation direct instead of relying on the visitor ID as an implicit discriminator. Existing cookies without `bid` self-heal on the next load by falling through to the API fetch. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -12,11 +12,17 @@
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import * as esbuild from "esbuild";
|
||||
|
||||
const { version } = JSON.parse(readFileSync("./package.json", "utf-8"));
|
||||
|
||||
const shared = {
|
||||
bundle: true,
|
||||
target: "es2020",
|
||||
define: {
|
||||
__SDK_VERSION__: JSON.stringify(version),
|
||||
},
|
||||
};
|
||||
|
||||
await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user