A Neovim plugin enabling you to solve LeetCode problems.
fix: add user-agent header (#70)
1 file changed, +1 -0
+1-0lua/leetcode/api/headers.lua
| @@ -7,6 +7,7 @@ function headers.get() | ||
| 7 | 7 | local cookie = Cookie.get() |
| 8 | 8 | |
| 9 | 9 | return vim.tbl_extend("force", { |
| 10 | + ["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0", | |
| 10 | 11 | ["Referer"] = ("https://leetcode.%s"):format(config.domain), |
| 11 | 12 | ["Origin"] = ("https://leetcode.%s/"):format(config.domain), |
| 12 | 13 | ["Content-Type"] = "application/json", |