Skip to content

Commit

Permalink
fix: set 'Cache-Control: no-cache' for GHE server (#1622)
Browse files Browse the repository at this point in the history
Set 'Cache-Control: no-cache' for not only github.com but also GitHub Enterprise Server.

GitHub Enterprise Server has URL paths which is different from github.com.
  • Loading branch information
pddg authored Nov 5, 2024
1 parent d304ddf commit 71a5714
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/utils/api/__snapshots__/client.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/renderer/utils/api/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function shouldRequestWithNoCache(url: string) {

switch (parsedUrl.pathname) {
case '/notifications':
case '/api/v3/notifications':
return true;
default:
return false;
Expand Down

0 comments on commit 71a5714

Please sign in to comment.