mirror of
https://github.com/maciejpedzich/six-degs-of-f1.git
synced 2024-11-27 15:55:47 +01:00
Move setting Cache-Control to try block
This commit is contained in:
parent
cd9b4b2a8b
commit
a839f8f998
@ -24,12 +24,12 @@ try {
|
||||
|
||||
if (noEmptyParams && paramsNotEqual)
|
||||
graphProps = await getShortestPaths(source, dest);
|
||||
} catch (error) {
|
||||
return Astro.redirect('/error');
|
||||
}
|
||||
|
||||
// Cache the page for 2 weeks
|
||||
Astro.response.headers.set('Cache-Control', 'public, max-age=1209600');
|
||||
} catch (error) {
|
||||
return Astro.redirect('/error');
|
||||
}
|
||||
---
|
||||
|
||||
<BaseLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user