Skip to content

Commit

Permalink
fix: add user-agent header (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
HakonHarnes authored Mar 6, 2024
1 parent 65f2d1e commit 6ac0f12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/leetcode/api/headers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function headers.get()
local cookie = Cookie.get()

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

0 comments on commit 6ac0f12

Please sign in to comment.