Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion motoko/cert-var/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
Expand Down
1 change: 0 additions & 1 deletion motoko/daily_planner/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion motoko/evm_block_explorer/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion motoko/filevault/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if (!canisterId) {
}

const agentOptions = {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
};

Expand Down
1 change: 0 additions & 1 deletion motoko/flying_ninja/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion motoko/hello_world/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
7 changes: 3 additions & 4 deletions motoko/ic-pos/frontend/src/actors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { IcrcLedgerCanister, IcrcIndexCanister } from "@icp-sdk/canisters/ledger
import { createActor } from "./bindings/backend";
import { useAuth } from "./lib/auth";
import {
host,
rootKey,
backendCanisterId,
icrc1LedgerCanisterId,
Expand All @@ -22,7 +21,7 @@ export function useBackendActor() {
const actor = useMemo(
() =>
createActor(backendCanisterId, {
agentOptions: { host, rootKey, identity },
agentOptions: { rootKey, identity },
}),
[identity]
);
Expand All @@ -35,7 +34,7 @@ export function useIcrcLedger() {
const { identity } = useAuth();

return useMemo(() => {
const agent = HttpAgent.createSync({ host, rootKey, identity });
const agent = HttpAgent.createSync({ rootKey, identity });
return IcrcLedgerCanister.create({
agent,
canisterId: Principal.fromText(icrc1LedgerCanisterId),
Expand All @@ -48,7 +47,7 @@ export function useIcrcIndex() {
const { identity } = useAuth();

return useMemo(() => {
const agent = HttpAgent.createSync({ host, rootKey, identity });
const agent = HttpAgent.createSync({ rootKey, identity });
return IcrcIndexCanister.create({
agent,
canisterId: Principal.fromText(icrc1IndexCanisterId),
Expand Down
2 changes: 0 additions & 2 deletions motoko/ic-pos/frontend/src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ export const icrc1IndexCanisterId = requireCanisterId(
);
export const rootKey = env?.IC_ROOT_KEY;

export const host = window.location.origin;

export const isLocal = /localhost|127\.0\.0\.1/.test(window.location.hostname);

// Internet Identity provider. Locally the network serves II at
Expand Down
1 change: 0 additions & 1 deletion motoko/llm_chatbot/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion motoko/random_maze/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion motoko/superheroes/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion motoko/vetkeys/basic_bls_signing/frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ async function getBasicBlsSigningActor(): Promise<Backend> {
}
const agent = await HttpAgent.create({
identity: await authClient.getIdentity(),
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
basicBlsSigningActor = createActor(canisterId, { agent });
Expand Down
1 change: 0 additions & 1 deletion motoko/vetkeys/basic_ibe/frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ async function getBasicIbeActor(): Promise<Backend> {

const agent = await HttpAgent.create({
identity: await authClient.getIdentity(),
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
basicIbeActor = createActor(canisterId, { agent });
Expand Down
1 change: 0 additions & 1 deletion motoko/vetkeys/basic_vetkd/frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ async function getActor() {
if (!canisterId) throw new Error("Canister ID for backend is not set. Deploy first.");
const agent = await HttpAgent.create({
identity: authClient ? await authClient.getIdentity() : undefined,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
backendActor = createActor(canisterId, { agent });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export async function createActor(options?: { identity?: any }): Promise<Backend
const canisterId = canisterEnv?.["PUBLIC_CANISTER_ID:backend"];
const agent = await HttpAgent.create({
identity: options?.identity,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
return createEncryptedNotesActor(canisterId, { agent });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export async function createEncryptedMaps(

const agent = await HttpAgent.create({
...agentOptions,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ export async function createPasswordManager(agentOptions?: {

const agent = await HttpAgent.create({
...agentOptions,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});

Expand Down
1 change: 0 additions & 1 deletion motoko/who_am_i/src/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if (!canisterId) {
}

const agentOptions = {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
};

Expand Down
1 change: 0 additions & 1 deletion rust/daily_planner/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion rust/evm_block_explorer/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion rust/face-recognition/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion rust/flying_ninja/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion rust/hello_world/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
2 changes: 1 addition & 1 deletion rust/image-classification/frontend/public/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Content-Security-Policy: default-src 'self';script-src 'self' 'unsafe-eval';connect-src 'self' https://icp.net https://*.icp.net;img-src 'self' data:;style-src * 'unsafe-inline';style-src-elem * 'unsafe-inline';font-src *;object-src 'none';base-uri 'self';frame-ancestors 'none';form-action 'self';upgrade-insecure-requests;
Content-Security-Policy: default-src 'self';script-src 'self' 'unsafe-eval';connect-src 'self' http://localhost:* https://icp.net https://*.icp.net https://icp-api.io;img-src 'self' data:;style-src * 'unsafe-inline';style-src-elem * 'unsafe-inline';font-src *;object-src 'none';base-uri 'self';frame-ancestors 'none';form-action 'self';upgrade-insecure-requests;

# Fingerprinted build assets never change - cache them hard
/assets/*
Expand Down
1 change: 0 additions & 1 deletion rust/image-classification/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion rust/llm_chatbot/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion rust/photo_gallery/frontend/src/actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
2 changes: 1 addition & 1 deletion rust/qrcode/frontend/public/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Content-Security-Policy: default-src 'self';script-src 'self' 'unsafe-eval';connect-src 'self' https://icp-api.io https://*.icp-api.io;img-src 'self' data:;style-src * 'unsafe-inline';style-src-elem * 'unsafe-inline';font-src *;object-src 'none';base-uri 'self';frame-ancestors 'none';form-action 'self';upgrade-insecure-requests;
Content-Security-Policy: default-src 'self';script-src 'self' 'unsafe-eval';connect-src 'self' http://localhost:* https://icp-api.io https://*.icp-api.io;img-src 'self' data:;style-src * 'unsafe-inline';style-src-elem * 'unsafe-inline';font-src *;object-src 'none';base-uri 'self';frame-ancestors 'none';form-action 'self';upgrade-insecure-requests;

# Fingerprinted build assets never change - cache them hard
/assets/*
Expand Down
1 change: 0 additions & 1 deletion rust/qrcode/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (!canisterId) {

export const backend = createActor(canisterId, {
agentOptions: {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
},
});
1 change: 0 additions & 1 deletion rust/vetkeys/basic_bls_signing/frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ async function getBasicBlsSigningActor(): Promise<Backend> {
}
const agent = await HttpAgent.create({
identity: await authClient.getIdentity(),
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
basicBlsSigningActor = createActor(canisterId, { agent });
Expand Down
1 change: 0 additions & 1 deletion rust/vetkeys/basic_ibe/frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ async function getBasicIbeActor(): Promise<Backend> {

const agent = await HttpAgent.create({
identity: await authClient.getIdentity(),
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
basicIbeActor = createActor(canisterId, { agent });
Expand Down
1 change: 0 additions & 1 deletion rust/vetkeys/basic_timelock_ibe/frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ async function getBasicTimelockIbeCanister(): Promise<Backend> {

const agent = await HttpAgent.create({
identity: await authClient.getIdentity(),
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});

Expand Down
1 change: 0 additions & 1 deletion rust/vetkeys/basic_vetkd/frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ async function getActor() {
if (!canisterId) throw new Error("Canister ID for backend is not set. Deploy first.");
const agent = await HttpAgent.create({
identity: authClient ? await authClient.getIdentity() : undefined,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
backendActor = createActor(canisterId, { agent });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export async function createActor(options?: { identity?: any }): Promise<Backend
const canisterId = canisterEnv?.["PUBLIC_CANISTER_ID:backend"];
const agent = await HttpAgent.create({
identity: options?.identity,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});
return createEncryptedNotesActor(canisterId, { agent });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export async function createEncryptedMaps(

const agent = await HttpAgent.create({
identity,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export async function createPasswordManager(

const agent = await HttpAgent.create({
identity,
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
});

Expand Down
1 change: 0 additions & 1 deletion rust/who_am_i/src/frontend/src/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if (!canisterId) {
}

const agentOptions = {
host: window.location.origin,
rootKey: canisterEnv?.IC_ROOT_KEY,
};

Expand Down
Loading