mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: add sticky headers to the git diff (#22425)
<!-- If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting. -->
This commit is contained in:
@@ -90,6 +90,14 @@ export default defineConfig({
|
||||
target: process.env.CODER_HOST || "http://localhost:3000",
|
||||
secure: process.env.NODE_ENV === "production",
|
||||
configure: (proxy) => {
|
||||
if (process.env.CODER_SESSION_TOKEN) {
|
||||
proxy.on("proxyReq", (proxyReq) => {
|
||||
proxyReq.setHeader(
|
||||
"Coder-Session-Token",
|
||||
process.env.CODER_SESSION_TOKEN!,
|
||||
);
|
||||
});
|
||||
}
|
||||
// Vite does not catch socket errors, and stops the webserver.
|
||||
// As /logs endpoint can return HTTP 4xx status, we need to embrace
|
||||
// Vite with a custom error handler to prevent from quitting.
|
||||
|
||||
Reference in New Issue
Block a user