-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
code server web: have a commit in the static and callback routes #147311
Conversation
7e4c7fe
to
d364f56
Compare
@@ -148,7 +159,7 @@ export class WebClientServer { | |||
return serveError(req, res, 400, `Bad request.`); | |||
} | |||
|
|||
return serveFile(this._logService, req, res, filePath, headers); | |||
return serveFile(filePath, this._environmentService.isBuilt ? CacheControl.NO_EXPIRY : CacheControl.NO_CACHING, this._logService, req, res, headers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running from source, this should be CacheControl.ETAG
to maintain existing behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running from sources I prefer no caching and I don't see a benefit of sticking to ETags. So unless you strongly object, I'd make that change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's continue in #148642
Merged the web server changes. I'll create a new PR for the remaining changes. |
The bult-in web server used for code server web accesses sources and artifacts using the
/static
and/callback
routes.The pr adds a
quality-commit
segment in from of these.That helps with caching and allows to hand over from one server (running an older version) to another server, running the latest version.