Skip to content

Commit

Permalink
Merge pull request #2 from ripexz/ua
Browse files Browse the repository at this point in the history
Update user-agent to match standards
  • Loading branch information
ripexz authored Jan 13, 2020
2 parents 6079d97 + cbeca55 commit ae74690
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logpasta.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/ripexz/logpasta/clipboard"
)

var version = "v0.3.1"
var version = "v0.3.2"

func main() {
initLogger()
Expand Down
6 changes: 5 additions & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"strings"
"time"
)

Expand Down Expand Up @@ -43,7 +44,10 @@ func saveLog(conf *Config, content string) (*Paste, error) {
}
req.Header.Add("Content-Type", "application/json")
req.Header.Set("Content-Encoding", "gzip")
req.Header.Set("User-Agent", fmt.Sprintf("Logpasta CLI %s", version))
req.Header.Set("User-Agent", fmt.Sprintf(
"Logpasta-CLI/%s",
strings.Replace(version, "v", "", -1),
))

res, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit ae74690

Please sign in to comment.