vormkracht10 / laravel-open-graph-image

Dynamically create Open Graph images for your website
MIT License
60 stars 2 forks source link

403 forbidden on image show #28

Open dotsoftwarenl opened 5 months ago

dotsoftwarenl commented 5 months ago

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.

Baspa commented 5 months ago

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

markvaneijk commented 5 months ago

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.

Baspa commented 5 months ago

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

dotsoftwarenl commented 5 months ago

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.