RSSAmplifier

Nick Sergeant · Nov 6, 2024

TIL: Using next/headers will opt your route into dynamic rendering.

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

In hindsight, this feels pretty obvious. But, I spent 20 minutes trying to track down why exactly a page wasn't pre-rendering like I had expected it to. I have some code in one of my pages that throws an error page if you're requesting the page from any IP other than our home IP (this is for a household info screen): const header = headers(); const ip = header.get('x-forwarded-for'); if…

Read on nicksergeant.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.