-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: 416 error when generating LinkedIn post preview for static app #377
Comments
linkedin Post Inspector sends Other servers seem to respond with a |
@ayame113 Thank you so much for digging into this! Out of curiosity, how did you determine the headers sent by the Post Inspector? |
I deployed a server like below in deno deploy and generated a preview in Post Inspector. After that I saw the header in the log. import { serve } from "https://deno.land/std@0.185.0/http/server.ts";
serve((req: Request) => {
console.log([...req.headers]);
new Response("Hello World");
}); |
A new version of std has been published (https://github.com/denoland/deno_std/releases/tag/0.186.0). Hopefully the problem should have been fixed. |
After upgrading our dependencies to 0.186.0, the problem is resolved! Thank you so much for your help in identifying the issue and supplying the fix! Post Inspector for confirmation of fix: https://www.linkedin.com/post-inspector/inspect/stillme.app |
Problem description
We have a web app hosted on Deno Deploy that has a small API but serves static content to the browser via the std/http/file_server.ts library. The app is accessible via https://stillme.app and we are trying to ensure that open graph post previews work, and they do in all places except LinkedIn.
We used their Post Inspector tool and saw that their crawler receives a 416 error when trying to access our app. Almost no other details are provided. (Sometimes it fails with a server error instead, but we see the 416 more often.)
Our experience is identical to an Azure Static Web App issue reported here, which seemed to be resolved by the Azure team on their side: Azure/static-web-apps#57
We are trying to reproduce using a sharable example, but figured we'd post the question while we do that. We are unable to reproduce with any apps that do not use the file_server, e.g. merch.deno.com, the Fresh demo app, etc.
Steps to reproduce
Expected behavior
We expect a preview to be generated with a 200 OK status.
Environment
Code snippet of the main.ts entrypoint:
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: