1
0
mirror of synced 2026-01-03 15:05:54 -05:00

Branch was updated using the 'autoupdate branch' Actions workflow.

This commit is contained in:
Octomerger Bot
2021-02-03 02:35:58 +10:00
committed by GitHub
3 changed files with 15 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
| Virtual environment | YAML workflow label |
| --------------------|---------------------|
| Windows Server 2019 | `windows-latest` or `windows-2019` |
| Ubuntu 20.04 | `ubuntu-20.04` |
| Ubuntu 18.04 | `ubuntu-latest` or `ubuntu-18.04` |
| Ubuntu 20.04 | `ubuntu-latest` (see note) or `ubuntu-20.04` |
| Ubuntu 18.04 | `ubuntu-latest` (see note) or `ubuntu-18.04` |
| Ubuntu 16.04 | `ubuntu-16.04` |
| macOS Big Sur 11.0 | `macos-11.0` |
| macOS Catalina 10.15 | `macos-latest` or `macos-10.15` |

View File

@@ -1,5 +1,5 @@
{% note %}
**Note:** The Ubuntu 20.04 virtual environment is currently provided as a preview only. The `ubuntu-latest` YAML workflow label still uses the Ubuntu 18.04 virtual environment.
**Note:** The `ubuntu-latest` label is currently being migrated from the Ubuntu 18.04 virtual environment to Ubuntu 20.04. Specifying the `ubuntu-latest` label during the migration might use either virtual environment. To explicitly use Ubuntu 20.04 or Ubuntu 18.04, specify `ubuntu-20.04` or `ubuntu-18.04`. When the migration is complete, `ubuntu-latest` will use the Ubuntu 20.04 virtual environment. For more information about the migration, see "[Ubuntu-latest workflows will use Ubuntu-20.04](https://github.com/actions/virtual-environments/issues/1816)."
{% endnote %}

View File

@@ -1,7 +1,19 @@
const FASTLY_TTL = process.env.FASTLY_TTL || String(60 * 60 * 24) // 24 hours
const STALE_TTL = String(60 * 10) // 10 minutes
const BYPASS_FASTLY = process.env.TEST_BYPASS_FASTLY === 'true'
const BYPASS_PRODUCTS = /^\/([a-z]{2})\/([a-z0-9._-]+@[a-z0-9._-]+\/)?(discussions|packages|actions)(\/.*|$)/i
module.exports = (req, res, next) => {
// Test bypassing Fastly for all pages inside of the Discussions product
if (BYPASS_FASTLY && BYPASS_PRODUCTS.test(req.originalUrl)) {
res.set({
'surrogate-control': 'private, no-store',
'cache-control': 'private, no-store'
})
return next()
}
res.set({
// Say you want Fastly to cache your content but you don't want it cached by browsers.