gaurav-nelson / github-action-markdown-link-check

Check all links in markdown files if they are alive or dead. 🔗✔️
MIT License
399 stars 77 forks source link

Add cookie support between redirects #182

Open jonatan-ivanov opened 1 year ago

jonatan-ivanov commented 1 year ago

There are sites that are sending a redirect with a cookie if the request does not have one, for examlpe Twitter started doing this, so those links are now marked as broken even if they are not:

echo 'https://twitter.com' |  markdown-link-check

You can also verify this with curl, this should fail:

curl --verbose --location 'https://twitter.com'

But if you enable cookies, it works:

curl --verbose --location --cookie --junk-session-cookies 'https://twitter.com'

Workaround: sending some static cookies in the headers but having support for this would be nice, since sites can change the cookies they mandate any time. See: https://github.com/jonatan-ivanov/develotters-blog/commit/727cfd5a7f200014ba6cae9b756a6fcb329fd4de

gaurav-nelson commented 1 month ago

I have stopped working on this action. Please try https://github.com/UmbrellaDocs/linkspector and https://github.com/UmbrellaDocs/action-linkspector instead.

jonatan-ivanov commented 1 month ago

Thank for the answer. Please consider the followings:

gaurav-nelson commented 1 month ago

Thank you @jonatan-ivanov I'll plan that.