Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

488 B
Raw Blame
import { signInternalCallback } from '@/libs/qstash/internalSignature';

/** Exercise the real callback authentication with the exact serialized request body. */
export const signedCallbackRequest = (path: string, payload: unknown) => {
  const url = new URL(path, process.env.APP_URL).href;
  const body = JSON.stringify(payload);
  return new Request(url, {
    body,
    headers: { 'content-type': 'application/json', ...signInternalCallback(url, body) },
    method: 'POST',
  });
};