vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.2k stars 27.02k forks source link

App Router Metadata Files uses Vercel Authentication on latest production deployment #63655

Open niteshsrivats opened 8 months ago

niteshsrivats commented 8 months ago

Link to the code that reproduces this issue

https://github.com/niteshsrivats/vercel-metadata-files-bug-reproduction

To Reproduce

  1. Place image named "opengraph-image.jpg" and "twitter-image.jpg" inside the app folder
  2. Deploy on Vercel

Current vs. Expected behavior

Expectation:

  1. The image URLs are public
  2. The image URLs use the production domain (assigned domain)

Current:

  1. The image URLs can only be accessed after going through Vercel Authentication
  2. The image URLs use the deployment preview domain

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
Binaries:
  Node: 18.17.1
  npm: 10.0.0
  Yarn: 1.22.19
  pnpm: 8.15.4
Relevant Packages:
  next: 14.1.3
  eslint-config-next: 14.1.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

devjiwonchoi commented 8 months ago

Hi, I think this is an expected behavior, and you can opt-out with Methods to bypass Deployment Protection.