Skip to content

Commit

Permalink
Renamed user agent and Added default maxthread to GO
Browse files Browse the repository at this point in the history
  • Loading branch information
tombui99 committed Apr 24, 2024
1 parent d99032a commit 4df257c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/sswlinkauditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func getClient() *http.Client {

func addClientHeaders(r *http.Request) {
if r != nil {
r.Header.Add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36")
r.Header.Add("User-Agent", "Mozilla/5.0 (compatible; SSWCodeAuditor; +https://codeauditor.com/)")
r.Header.Set("Cache-Control", "no-cache")
r.Header.Set("Connection", "keep-alive")
r.Header.Set("Accept-Encoding", "*")
Expand Down
2 changes: 1 addition & 1 deletion docker/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ exports.runBrokenLinkCheck = (url, maxthread) => {
try {
const comand = maxthread
? `./sswlinkauditor ${url} ${maxthread}`
: `./sswlinkauditor ${url}`;
: `./sswlinkauditor ${url} 100`; // Default maxthread to 100 (Golang default is 10000)
return [execSync(comand, { maxBuffer: 20000 * 1024 }).toString(), null];
} catch (error) {
return [null, error.message];
Expand Down

0 comments on commit 4df257c

Please sign in to comment.