prevents leaking headers to upstream API when serving via Tailscale
This commit is contained in:
parent
b1062dc9b3
commit
d3e7ef3c14
|
@ -7,10 +7,15 @@ import { HPMRequestCallback } from "../index";
|
|||
export const stripHeaders: HPMRequestCallback = (proxyReq) => {
|
||||
proxyReq.setHeader("origin", "");
|
||||
proxyReq.setHeader("referer", "");
|
||||
|
||||
proxyReq.removeHeader("tailscale-user-login");
|
||||
proxyReq.removeHeader("tailscale-user-name");
|
||||
proxyReq.removeHeader("tailscale-headers-info");
|
||||
proxyReq.removeHeader("tailscale-user-profile-pic")
|
||||
proxyReq.removeHeader("cf-connecting-ip");
|
||||
proxyReq.removeHeader("forwarded");
|
||||
proxyReq.removeHeader("true-client-ip");
|
||||
proxyReq.removeHeader("x-forwarded-for");
|
||||
proxyReq.removeHeader("x-forwarded-host");
|
||||
proxyReq.removeHeader("x-forwarded-proto");
|
||||
proxyReq.removeHeader("x-real-ip");
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue