fly-apps / fly-laravel

Run your Laravel apps on Fly
40 stars 3 forks source link

Fly.toml template always uses the 'ams' primary region #37

Closed Johannes-Werbrouck closed 1 year ago

Johannes-Werbrouck commented 1 year ago

We should find out the region closest to the user and use that as the primary region. Use flyctl platform region to get all the current regions on Fly.io

Johannes-Werbrouck commented 1 year ago

apparently the fly proxy sets the closest region on the request header Fly-region. So perhaps we could make an http request to the machines api and get the header of the response to get the nearest region?