Skip to content

Commit

Permalink
Forced refresh method (#1998)
Browse files Browse the repository at this point in the history
Fixes #1996.
  • Loading branch information
dakota002 authored Feb 29, 2024
1 parent dbd34ce commit 3e6e0e1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/routes/_gcn.circulars.$circularId.($version)/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ import { FrontMatter } from './FrontMatter'
import DetailsDropdownButton from '~/components/DetailsDropdownButton'
import DetailsDropdownContent from '~/components/DetailsDropdownContent'
import { feature, origin } from '~/lib/env.server'
import {
getCanonicalUrlHeaders,
pickHeaders,
publicStaticShortTermCacheControlHeaders,
} from '~/lib/headers.server'
import { getCanonicalUrlHeaders, pickHeaders } from '~/lib/headers.server'
import { useSearchString } from '~/lib/utils'
import { useFeature } from '~/root'
import type { BreadcrumbHandle } from '~/root/Title'
Expand All @@ -50,12 +46,15 @@ export async function loader({

return json(result, {
headers: {
...publicStaticShortTermCacheControlHeaders,
...getCanonicalUrlHeaders(new URL(`/circulars/${circularId}`, origin)),
},
})
}

export function shouldRevalidate() {
return true
}

export const headers: HeadersFunction = ({ loaderHeaders }) =>
pickHeaders(loaderHeaders, ['Link'])

Expand Down

0 comments on commit 3e6e0e1

Please sign in to comment.