irongit

A Neovim plugin enabling you to solve LeetCode problems.

fix: add user-agent header (#70)

Håkon Harnesauthored committed by GitHub
parent 65f2d1ecommit 6ac0f12143cc8adbc83fc055e4e73861ac78030aBrowse files

1 file changed, +1 -0

+1-0lua/leetcode/api/headers.lua
@@ -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",