Skip to content

Commit dd20f62

Browse files
committed
Resolve merge conflicts with master
2 parents 9b4c7e9 + 45ff1da commit dd20f62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/routers/slise-ad-rules/providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ adProvidersRouter
172172
withExceptionHandler(async (_req, res) => {
173173
const providers = await getAdProvidersForAllSites();
174174

175-
res.status(200).send(providers);
175+
res.status(200).header('Cache-Control', 'public, max-age=300').send(providers);
176176
})
177177
)
178178
.post(

src/utils/express-helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export const withBodyValidation =
2121
<T>(schema: Schema<T>, handler: TypedBodyRequestHandler<T>): RequestHandler =>
2222
async (req, res, next) => {
2323
try {
24-
console.log('oy vey 1', JSON.stringify(req.body), JSON.stringify(await schema.validate(req.body)));
2524
req.body = await schema.validate(req.body);
2625
} catch (error) {
2726
if (error instanceof ValidationError) {
@@ -85,7 +84,7 @@ export const addObjectStorageMethodsToRouter = <U, V = U>(
8584

8685
const value = await methods.getByKey(key);
8786

88-
res.status(200).send(value);
87+
res.status(200).header('Cache-Control', 'public, max-age=300').send(value);
8988
})
9089
);
9190

@@ -108,6 +107,7 @@ export const addObjectStorageMethodsToRouter = <U, V = U>(
108107

109108
res
110109
.status(200)
110+
.header('Cache-Control', 'public, max-age=300')
111111
.send(
112112
Object.fromEntries(Object.entries(values).map(([key, value]) => [key, transformGotValueFn(value, req)]))
113113
);

0 commit comments

Comments
 (0)