Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

How to hide from production #1

Open
stolinski opened this issue Apr 13, 2022 · 1 comment
Open

How to hide from production #1

stolinski opened this issue Apr 13, 2022 · 1 comment

Comments

@stolinski
Copy link
Contributor

Open to suggestions.

@didier
Copy link

didier commented Oct 1, 2022

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;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants