* Parse color_mode cookie in browser * Update useTheme.ts * Update use-theme.js * Update use-theme.js * Add support for dark_high_contrast Per https://primer.style/css/support/theming I also checked all the color mode options, this is the only additional working with Primer 20 so far * Remove gray bg * Remove type * Use defaults instead of types for fn args * Thicker types
17 lines
393 B
JavaScript
17 lines
393 B
JavaScript
import express from 'express'
|
|
import { cacheControlFactory } from '../cache-control.js'
|
|
|
|
const router = express.Router()
|
|
const noCacheControl = cacheControlFactory(0)
|
|
|
|
router.get('/', (req, res) => {
|
|
noCacheControl(res)
|
|
res.json({
|
|
isSignedIn: Boolean(req.cookies?.dotcom_user),
|
|
csrfToken: req.csrfToken?.() || '',
|
|
userLanguage: req.userLanguage,
|
|
})
|
|
})
|
|
|
|
export default router
|