milkshakesoftware/PreMailer.Net

link tag with default user-agent can't avoid 400 error

mikebridge opened this issue · 0 comments

When I have a link in the header of an email that points to e.g. https://fonts.googleapis.com/css?family=Roboto&display=swap, Premailer sees a 400 error when following that link. It looks like Google is filtering clients by UserAgent---when I use a standard browser user agent in curl I get a 200 return status.

I'm not sure whether it's better to just exclude these links, but it might be nice if it were possible to be able to ignore a 400 error and continue parsing or else allow the caller to configure the user agent.