mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd): prevent agent reverse proxy from using HTTP[S]_PROXY envs (#12875)
Updates https://github.com/coder/coder/issues/12790
This commit is contained in:
+5
-2
@@ -32,11 +32,14 @@ import (
|
||||
var tailnetTransport *http.Transport
|
||||
|
||||
func init() {
|
||||
var valid bool
|
||||
tailnetTransport, valid = http.DefaultTransport.(*http.Transport)
|
||||
tp, valid := http.DefaultTransport.(*http.Transport)
|
||||
if !valid {
|
||||
panic("dev error: default transport is the wrong type")
|
||||
}
|
||||
tailnetTransport = tp.Clone()
|
||||
// We do not want to respect the proxy settings from the environment, since
|
||||
// all network traffic happens over wireguard.
|
||||
tailnetTransport.Proxy = nil
|
||||
}
|
||||
|
||||
var _ workspaceapps.AgentProvider = (*ServerTailnet)(nil)
|
||||
|
||||
Reference in New Issue
Block a user