Set Cache-Control: no-store

This commit is contained in:
Justin Spahr-Summers 2025-02-18 14:08:07 +00:00
commit 63db32236e
No known key found for this signature in database
4 changed files with 8 additions and 0 deletions

View file

@ -52,6 +52,8 @@ export function authorizationHandler({ provider, rateLimit: rateLimitConfig }: A
// Define the handler
router.all("/", async (req, res) => {
res.setHeader('Cache-Control', 'no-store');
let client_id, redirect_uri;
try {
const data = req.method === 'POST' ? req.body : req.query;

View file

@ -63,6 +63,8 @@ export function clientRegistrationHandler({
}
router.post("/", async (req, res) => {
res.setHeader('Cache-Control', 'no-store');
let clientMetadata;
try {
clientMetadata = OAuthClientMetadataSchema.parse(req.body);

View file

@ -48,6 +48,8 @@ export function revocationHandler({ provider, rateLimit: rateLimitConfig }: Revo
router.use(authenticateClient({ clientsStore: provider.clientsStore }));
router.post("/", async (req, res) => {
res.setHeader('Cache-Control', 'no-store');
let revocationRequest;
try {
revocationRequest = OAuthTokenRevocationRequestSchema.parse(req.body);

View file

@ -59,6 +59,8 @@ export function tokenHandler({ provider, rateLimit: rateLimitConfig }: TokenHand
router.use(authenticateClient({ clientsStore: provider.clientsStore }));
router.post("/", async (req, res) => {
res.setHeader('Cache-Control', 'no-store');
let grant_type;
try {
({ grant_type } = TokenRequestSchema.parse(req.body));