mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add "cache-control:no-cache" and "last-modifed" to headers to prevent GitHub CDN from caching Travis nightly badge (#3449)
This commit is contained in:
@@ -102,7 +102,7 @@ If you have any problems building, please consult the developer [FAQ][].
|
||||
[tv-site]: https://travis-ci.org/PowerShell/PowerShell/branches
|
||||
[av-image]: https://ci.appveyor.com/api/projects/status/nsng9iobwa895f98/branch/master?svg=true
|
||||
[av-site]: https://ci.appveyor.com/project/PowerShell/powershell
|
||||
[tv-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.svg?dummy=unused
|
||||
[tv-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.svg
|
||||
[av-nightly-image]: https://ci.appveyor.com/api/projects/status/46yd4jogtm2jodcq?svg=true
|
||||
[av-nightly-site]: https://ci.appveyor.com/project/PowerShell/powershell-f975h
|
||||
[cc-site]: https://coveralls.io/github/PowerShell/PowerShell?branch=master
|
||||
|
||||
+4
-2
@@ -42,9 +42,11 @@ function Set-DailyBuildBadge
|
||||
$bytes = ([System.Text.Encoding]::UTF8.GetBytes($body))
|
||||
$contentLength = $bytes.length
|
||||
|
||||
$now = [datetime]::UtcNow.ToString("R", [System.Globalization.CultureInfo]::InvariantCulture)
|
||||
$headers = @{
|
||||
"x-ms-date" = [datetime]::UtcNow.ToString("R", [System.Globalization.CultureInfo]::InvariantCulture)
|
||||
"Content-Length" = "$contentLength"
|
||||
"x-ms-date" = $now
|
||||
"cache-control" = "no-cache"
|
||||
"last-modified" = $now
|
||||
"x-ms-blob-type" = "BlockBlob"
|
||||
"x-ms-version" = "$headerDate"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user