Skip to content

Commit

Permalink
Allow redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
phgn0 committed Feb 29, 2024
1 parent 1904ef0 commit 47ae533
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/api/src/crawler/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ router.addHandler("document", async ({ $, request, log, enqueueLinks }) => {

const originalUrl = normalizeUrl(request.url);
const originalDomain = getDomain(originalUrl);
const originalPathname = new URL(originalUrl).pathname;

// Detect post type
const postType = getPostType(pathname);
const postType = getPostType(pathname) || getPostType(originalPathname);
if (!postType) {
log.info(`${domain} ${pathname} skipped (not /about, /now, or /ideas)\n`);
return;
Expand Down

0 comments on commit 47ae533

Please sign in to comment.