bookit icon indicating copy to clipboard operation
bookit copied to clipboard

How to hide from production

Open stolinski opened this issue 3 years ago • 1 comments

Open to suggestions.

stolinski avatar Apr 13 '22 23:04 stolinski

Think this should be handled using hooks.js.

/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
  if (event.url.pathname.startsWith('/bookit')) {
    return new Response('custom response'); // ← We'd need to return a 404 here.
  }
 
  const response = await resolve(event);
  return response;
}

didier avatar Oct 01 '22 11:10 didier