Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

graymur's avatar

Enable CORS on forge.laravel.com

I'm using forge.laravel.com as a hosting and for one of the projects I need to enable CORS headers for js/css/fonts. Adding CORS middleware to laravel doesn't help, since those files are served by webserver directly without involving PHP.

I searched forge.laravel.com UI, but didn't find anything CORS-related. Is there a way to enable it?

Thanks!

0 likes
4 replies
graymur's avatar

@bobbybouwmann

That fixes CORS requests to URLs served by Laravel itself, I've already done that. But I need to enable CORS for static content that's served by webserver

graymur's avatar

I've solved this by ssh-ing to AWS and updating ngnix config.

Please or to participate in this conversation.