Skip to content
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

Referer support for URL Preview #3

Open
gilmanmax opened this issue Nov 8, 2022 · 2 comments
Open

Referer support for URL Preview #3

gilmanmax opened this issue Nov 8, 2022 · 2 comments
Milestone

Comments

@gilmanmax
Copy link

gilmanmax commented Nov 8, 2022

When I try to go on to a LinkedIn Profile with the URL Preview sometimes I get an "access denied" error. This is because I may get a "Logon" wall when directly trying to view the profile. This gets me a "999" status..

However, if I manually do a call to the site through an API tester and set the referer as a header on a tester such as google.com, then the call works as expected and I receive a "200". Is there a way and put referers or headers into the request? We tried changing the user agent to no avail.

@mqudsi
Copy link
Member

mqudsi commented Nov 22, 2022

The recently released UrlPreview 1.2.0 has an option to override the user agent; I guess we should add another property to override the referer field, too.

@mqudsi
Copy link
Member

mqudsi commented Nov 23, 2022

UrlPreview 1.3.0 has been released with a new UrlPreview.Referrer field that may be set to override the default HTTP referer.

The default referer value used when not overridden has also been tweaked and may be more compatible out-of-the-box.

https://www.nuget.org/packages/UrlPreview

@mqudsi mqudsi added this to the 1.3.0 milestone Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants