Repository: next.js
Issue: CORS error is thrown when load fonts by using fontLocal
Labels: bug,Font (next/font),Runtime

### Link to the code that reproduces this issue

[Codesandbox solution](https://codesandbox.io/p/devbox/hungry-tharp-y47qpv?file=%2Fnext.config.js%3A4%2C20&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clqc1j1yn0009356jps346007%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clqc1j1yn0002356jd07szzke%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clqc1j1yn0006356jvbty1enk%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clqc1j1yn0008356j4tfjfip5%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B58.813949032381686%252C41.186050967618314%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clqc1j1yn0002356jd07szzke%2522%253A%257B%2522id%2522%253A%2522clqc1j1yn0002356jd07szzke%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clqc1j1yn0001356j5iao7z6u%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FREADME.md%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522clqdwqvnz0002356kv5kf8utz%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A4%252C%2522startColumn%2522%253A20%252C%2522endLineNumber%2522%253A4%252C%2522endColumn%2522%253A20%257D%255D%252C%2522filepath%2522%253A%2522%252Fnext.config.js%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clqdwqvnz0002356kv5kf8utz%2522%257D%252C%2522clqc1j1yn0008356j4tfjfip5%2522%253A%257B%2522id%2522%253A%2522clqc1j1yn0008356j4tfjfip5%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522port%2522%253A46083%252C%2522taskId%2522%253A%2522start%2522%252C%2522id%2522%253A%2522clqdwss510099356k2a5m9f0s%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clqdwss510099356k2a5m9f0s%2522%257D%252C%2522clqc1j1yn0006356jvbty1enk%2522%253A%257B%2522id%2522%253A%2522clqc1j1yn0006356jvbty1enk%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clqc1j1yn0004356j0jt42pyz%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522build%2522%257D%252C%257B%2522id%2522%253A%2522clqc1j1yn0005356jm9yj218m%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522start%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clqc1j1yn0005356jm9yj218m%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D)

### To Reproduce

1. Introduce layout that uses _localFont_ 
2. Set _Access-Control-Allow-Origin_ header and set an origin where you are trying to render your nextjs app (https://codesandbox.io/p/devbox/hungry-tharp-y47qpv?file=%2Fnext.config.js%3A6%2C8)
3. Apply _font-family_ style (https://codesandbox.io/p/devbox/hungry-tharp-y47qpv?file=%2Fpages%2F%5B%5B...path%5D%5D.tsx%3A15%2C7)
4. Start app using "next build" && "next start"
5. Render a home page in a different origin (can be rendered by using api route, as an example)
6. Open network tab and check request for .woff2 file

### Current vs. Expected behavior

Following the steps from the previous section.

**Current behavior**
The font is not loaded, so it's not applied. CORS error is thrown
![image](https://github.com/vercel/next.js/assets/23364749/5649d446-d9d5-4d7b-8e42-b58d2519d225)
![image](https://github.com/vercel/next.js/assets/23364749/5ecea9f1-04b3-4acb-8d42-9ba0ba2653c0)
![image](https://github.com/vercel/next.js/assets/23364749/99e919d4-669b-4f71-8918-7d7e53af1749)


**Expected behavior**
The font is loaded successfully

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Enterprise
Binaries:
  Node: 18.18.2
  npm: 9.8.1
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.0.5-canary.18
  eslint-config-next: 13.5.6
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 4.9.4
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Font optimization (next/font), Middleware / Edge (API routes, runtime)

### Additional context

The first build that introduced the bug is **13.4.13-canary.0**, since reverting it to **13.4.12** works.
Seems like it's related to another issue that I created: https://github.com/vercel/next.js/issues/59766
I shared the same playground, there are no differences