The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
interface RegistryContext {
headers: Record<string, Record<string, string>>;
}
const context: RegistryContext = {
headers: {},
};
export function setRegistryHeaders(
headers: Record<string, Record<string, string>>
) {
context.headers = { ...context.headers, ...headers };
}
export function getRegistryHeadersFromContext(
url: string
): Record<string, string> {
return context.headers[url] || {};
}
export function clearRegistryContext() {
context.headers = {};
}