laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.78k stars 296 forks source link

CORS ERROR after server reloaded for few requests #908

Closed GhostvOne closed 4 months ago

GhostvOne commented 4 months ago

Octane Version

2.4.0

Laravel Version

11

PHP Version

8.3

What server type are you using?

FrankenPHP

Server Version

1.2.0

Database Driver & Version

mariadb

Description

When I'm using --watch for automaticly restart my server, i'm getting a CORS error for the first and the second request. I'm using 1 worker on my developement environement and laravel sanctum with cors policy.

Here you can see on the preflight request, there is no cors policy causing cors error just after server restart. (response time ~300ms) image

It's look like when the worker is not in memory yet it doesn't send cors policy. image

after 2 requests : it's fine (response time ~8ms) image

How is that possible ? Maybe a bug ?? Thanks for help

Steps To Reproduce

  1. Installing fresh server using octane and franken php with --watch --workers=1
  2. Automatic server restart by changing a file
  3. Send a preflight request. The first and the second response are not sending Cors rules (see images)
driesvints commented 4 months ago

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!