-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to using static routes for archive redirects
The dynamic route `circulars.$circularId.tsx` was conflicting with the dynamic route `circulars.archive[.]$suffix[.].tar.ts`.
- Loading branch information
Showing
4 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*! | ||
* Copyright © 2023 United States Government as represented by the | ||
* Administrator of the National Aeronautics and Space Administration. | ||
* All Rights Reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { redirect } from '@remix-run/node' | ||
|
||
import { publicStaticShortTermCacheControlHeaders } from '~/lib/headers.server' | ||
import { getArchiveURL } from '~/scheduled/circulars/uploadTar' | ||
|
||
export function loader() { | ||
return redirect(getArchiveURL('json'), { | ||
headers: publicStaticShortTermCacheControlHeaders, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*! | ||
* Copyright © 2023 United States Government as represented by the | ||
* Administrator of the National Aeronautics and Space Administration. | ||
* All Rights Reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { redirect } from '@remix-run/node' | ||
|
||
import { publicStaticShortTermCacheControlHeaders } from '~/lib/headers.server' | ||
import { getArchiveURL } from '~/scheduled/circulars/uploadTar' | ||
|
||
export function loader() { | ||
return redirect(getArchiveURL('txt'), { | ||
headers: publicStaticShortTermCacheControlHeaders, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters