Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set default user agent for external requests
Many servers will return errors (e.g. 400/403) to requests that do not set a User-Agent header. This results in issues in both the link_checker and load_data components. With the link_checker these are false positive dead links. In load_data, remote data fails to be fetched. To mitigate this issue, this sets a default User-Agent of $CARGO_PKG_NAME/$CARGO_PKG_VERSION Note that the root cause of this regression from zola v0.9.0 is that reqwest 0.10 changed their default behavior and no longer sets a User-Agent by default: seanmonstar/reqwest#751 Fixes #950.
- Loading branch information
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters