mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This PR adds a new example that shows a more complex use case where you don't want browser to know about the upstream image server so instead you can proxy through a serverless function. Some use cases might be checking for an IP address, user agent, etc.
19 lines
425 B
TypeScript
19 lines
425 B
TypeScript
import styles from "./page.module.css";
|
|
import { SecureImage } from "../components/secure-image";
|
|
|
|
export default function Home() {
|
|
return (
|
|
<div className={styles.page}>
|
|
<main className={styles.main}>
|
|
<h1>A frog from a secure origin</h1>
|
|
<SecureImage
|
|
src="/frog.png"
|
|
alt="A frog"
|
|
width={828 / 2}
|
|
height={621 / 2}
|
|
/>
|
|
</main>
|
|
</div>
|
|
);
|
|
}
|