-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attaching arbitrary headers to requests #187
Comments
So just to be clear, you need to be able to add a special HTTP Header to the requests? I should be able to make that happen if that's what you're saying. I can provide a config point that lets you provide a table with additional headers. |
@tjdevries yep, that is exactly what I'm saying! I'm also willing to make a PR to add this in if such a contribution would be welcome |
I can push an update -- there's a bit of ceremony involved for getting a new rust version update, so I'll do that. The headers are the same for every request? So you can set them ~static at runtime (can update, but doesn't need to update for every request?)? |
Yep, should be the same for every request in our case. |
Does what is in #191 give you what you're looking for? To test locally, you should be able to pull the branch down and then run |
hmmmm, it's still not working for me. Could definitely just be an issue somewhere on my side though |
you would do: require('sg').setup {
src_headers = {
key = value
}
} |
you shouldn't have to do the environment variable (I set that to pass information to subprocesses) |
gotcha, thank you!!! It's sending the right headers, so all good on my end! Thank you TJ! |
Sorry for the delay, I left sourcegraph but am doing some contracting stuff to support sg.nvim now :) Should be merged and working. Thanks for your patience! |
hi there, thank you for this plugin! I'd love to use it with my source graph instance, but it is unfortunately hidden behind a reverse proxy. I need to specify a header in every call made to sourcegraph, or provide a cookie that contains this header. What would be the best way of achieving this? I've tried to hack my way through the Lua, specifying this on the RPC call here:
sg.nvim/lua/sg/cody/rpc.lua
Line 50 in cb5c6e9
The text was updated successfully, but these errors were encountered: