Skip to content

Commit 8a77588

Browse files
authored
Add user-agent overwrite for discord requests
1 parent 14c6fa3 commit 8a77588

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

.github/workflows/artifacts.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
on:
44
release:
55
types: [created]
6+
workflow_dispatch:
67

78
jobs:
89
releases-matrix:

.github/workflows/docker-publish-tags.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
tags: [ 'v*.*.*' ]
1313
pull_request:
1414
branches: [ main ]
15+
workflow_dispatch:
1516

1617
env:
1718
# Use docker.io for Docker Hub if empty

lib/discord.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ func doDiscordReq(ctx context.Context, path string, method string, body io.ReadC
218218
return nil, err
219219
}
220220

221+
header.Set("User-Agent", "DiscordBot (https://easypoll.bot/, 1.0)")
222+
221223
discordReq.Header = header
222224
startTime := time.Now()
223225
discordResp, err := client.Do(discordReq)

0 commit comments

Comments
 (0)