laravel-open-graph-image icon indicating copy to clipboard operation
laravel-open-graph-image copied to clipboard

403 forbidden on image show

Open dotsoftwarenl opened this issue 1 year ago • 4 comments

Hi all,

We are currently using this package to generate custom Open Graph images in combination with Inertia.js SSR. The package works on my local environment, but deploying this package to AWS via Laravel Vapor, the generated URL gives me 403 Forbidden.

URL: https://cargopilot.com/open-graph-image?button=Register%20now&subtitle=Book%20air%20cargo%20in%20real%20time%20with%20CargoPilot.&title=CargoPilot&signature=aad87fb268df30f111e35d26acd03d8573f29421189ead5ff6390f769a25521c&.jpg

I have installed open-graph-image via php artisan. Did I miss anything in my setup?

Kind regards.

dotsoftwarenl avatar May 21 '24 12:05 dotsoftwarenl

I guess this has something to do with the URL being a signed url, when it's invalid that may cause the 403 error but I'm not sure why it could be invalid.

Do you have any idea maybe? @markvaneijk

Baspa avatar May 21 '24 13:05 Baspa

Hi @dotsoftwarenl, this should be a configuration issue. My guess: The APP_KEY is different between the environment that generates the SSR response and the environment where the open graph image is generated.

markvaneijk avatar May 22 '24 10:05 markvaneijk

Any success with figuring out what the issue was? @dotsoftwarenl

Baspa avatar May 29 '24 08:05 Baspa

No unfortunately not. I think it's due the fact it is deployed via Laravel Vapor, but I am not sure. I haven't really looked into the issue further.

dotsoftwarenl avatar May 31 '24 10:05 dotsoftwarenl