mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 12:25:05 +03:00
* Add a ClockSkewBanner on top of studio. * Fix the color of the RestrictionBanner. * Add an API endpoint which return the current UTC time on the server. * Fix the glob pattern for docs in turbo.json. * Force docs to build. * Revert unneeded changes. * Add feature flag for clock skew banner. * Add a comment.
12 lines
394 B
TypeScript
12 lines
394 B
TypeScript
import { NextApiRequest, NextApiResponse } from 'next'
|
|
|
|
// Returns the current UTC time in ISO format. Used to check if the client and server time are skewed. Clock skew causes
|
|
// issues with JWT verification.
|
|
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
|
const utcTime = new Date().toISOString()
|
|
|
|
return res.status(200).json({ utcTime })
|
|
}
|
|
|
|
export default handler
|