Skip to content

Commit 6ac0f12

Browse files
authored
fix: add user-agent header (#70)
1 parent 65f2d1e commit 6ac0f12

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/leetcode/api/headers.lua

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ function headers.get()
77
local cookie = Cookie.get()
88

99
return vim.tbl_extend("force", {
10+
["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0",
1011
["Referer"] = ("https://leetcode.%s"):format(config.domain),
1112
["Origin"] = ("https://leetcode.%s/"):format(config.domain),
1213
["Content-Type"] = "application/json",

0 commit comments

Comments
 (0)