···11-import { SERVICE_DID } from "@/lib/env";
11+import { SERVER_PORT, SERVICE_DID } from "@/lib/env";
22import { issueNewLatticeToken } from "@/lib/sessions";
33import { shardSessions } from "@/lib/state";
44import { HttpGeneralErrorType } from "@/lib/types/http/errors";
···184184185185 // FIXME: this also assumes that the requesting lattice's DID is a did:web
186186 // see below for the rest of the issues.
187187- if (routeThroughUri.rKey !== SERVICE_DID.slice(8)) {
187187+ let thisLatticeDomain = SERVICE_DID.slice(8);
188188+ if (thisLatticeDomain === "localhost")
189189+ thisLatticeDomain = `localhost:${SERVER_PORT.toString()}`;
190190+ if (routeThroughUri.rKey !== thisLatticeDomain) {
188191 errors.push(
189192 "Mismatch between claimant lattice and channel routeThrough. Request wants to validate for",
190193 routeThroughUri.rKey,