diff --git a/service/pool/Main.mo b/service/pool/Main.mo index c282a205..7bce335f 100644 --- a/service/pool/Main.mo +++ b/service/pool/Main.mo @@ -135,7 +135,7 @@ shared (creator) actor class Self(opt_params : ?Types.InitParams) = this { await getExpiredCanisterInfo(origin); }; - type InstallConfig = { profiling: Bool; is_whitelisted: Bool; origin: Text }; + type InstallConfig = { profiling: Bool; is_whitelisted: Bool; origin: Text; referrer: ?Text }; public shared ({ caller }) func installCode(info : Types.CanisterInfo, args : Types.InstallArgs, install_config : InstallConfig) : async Types.CanisterInfo { if (install_config.origin == "") { throw Error.reject "Please specify an origin"; diff --git a/src/build.ts b/src/build.ts index b88caff2..7447aee9 100644 --- a/src/build.ts +++ b/src/build.ts @@ -196,6 +196,7 @@ async function install( profiling, is_whitelisted: false, origin, + referrer: document.referrer || (window.opener && "(opener)") || undefined, }; const new_info = await backend.installCode( canisterInfo,