You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/fundamentals/static-files.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to serve and secure static files and configure Map Static
5
5
monikerRange: '>= aspnetcore-3.1'
6
6
ms.author: wpickett
7
7
ms.custom: mvc
8
-
ms.date: 09/02/2025
8
+
ms.date: 09/17/2025
9
9
uid: fundamentals/static-files
10
10
---
11
11
# Static files in ASP.NET Core
@@ -1123,16 +1123,24 @@ Property | Description
1123
1123
1124
1124
Item group | Description | Metadata
1125
1125
--- | ---
1126
-
`StaticWebAssetContentTypeMapping` | Maps file patterns to content types and cache headers for endpoints. | Pattern, Cache
1127
-
`StaticWebAssetFingerprintPattern` | Defines patterns for applying fingerprints to static web assets for cache busting. | Pattern, Expression
1126
+
`StaticWebAssetContentTypeMapping` | Maps file patterns to content types and cache headers for endpoints. | `Pattern`, `Cache`
1127
+
`StaticWebAssetFingerprintPattern` | Defines patterns for applying fingerprints to static web assets for cache busting. | `Pattern`, `Expression`
1128
1128
1129
1129
Metadata Descriptions:
1130
1130
1131
-
***Pattern**: A glob pattern used to match files. For `StaticWebAssetContentTypeMapping`, it matches files to determine their content type (for example, `*.js` for JavaScript files). For `StaticWebAssetFingerprintPattern`, it identifies multi-extension files that require special fingerprinting treatment (for example, `*.lib.module.js`).
1131
+
***`Pattern`**: A glob pattern used to match files. For `StaticWebAssetContentTypeMapping`, it matches files to determine their content type (for example, `*.js` for JavaScript files). For `StaticWebAssetFingerprintPattern`, it identifies multi-extension files that require special fingerprinting treatment (for example, `*.lib.module.js`).
1132
1132
1133
-
***Cache**: Specifies the `Cache-Control` header value for the matched content type. This controls browser caching behavior (for example, `max-age=3600, must-revalidate` for media files).
1133
+
***`Cache`**: Specifies the `Cache-Control` header value for the matched content type. This controls browser caching behavior (for example, `max-age=3600, must-revalidate` for media files).
1134
1134
1135
-
***Expression**: Defines how the fingerprint is inserted into the filename. The default is `#[.{fingerprint}]`, which inserts the fingerprint before the extension.
1135
+
***`Expression`**: Defines how the fingerprint is inserted into the filename. The default is `#[.{FINGERPRINT}]`, which inserts the fingerprint (`{FINGERPRINT}` placeholder) before the extension.
1136
+
1137
+
The following example maps the bitmap file pattern (`.bmp`) to the `image/bmp` content type with the `{CACHE HEADER}` placeholder representing the `Cache-Control` header to use for non-fingerprinted endpoints:
Copy file name to clipboardExpand all lines: aspnetcore/test/http-files.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: Use .http files in Visual Studio 2022
3
3
author: tdykstra
4
4
description: Learn how to use .http files in Visual Studio 2022 to test ASPNET Core apps.
5
5
monikerRange: '>= aspnetcore-8.0'
6
-
ms.topic: how-to
7
6
ms.author: tdykstra
8
-
ms.date: 01/19/2024
7
+
ms.date: 09/16/2025
8
+
ms.topic: how-to
9
9
uid: test/http-files
10
10
---
11
11
# Use .http files in Visual Studio 2022
@@ -112,6 +112,8 @@ Lines that start with either `#` or `//` are comments. These lines are ignored w
112
112
## Variables
113
113
114
114
A line that starts with `@` defines a variable by using the syntax `@VariableName=Value`.
115
+
The variable name is case-sensitive and can't contain any spaces.
116
+
The value can contain any characters, including the value `null` to represent a null value.
115
117
116
118
Variables can be referenced in requests that are defined later in the file. They're referenced by wrapping their names in double curly braces, `{{` and `}}`. The following example shows two variables defined and used in a request:
117
119
@@ -543,6 +545,7 @@ The Visual Studio 2022 `.http` file editor doesn't have all the features that th
543
545
* Prompt variables
544
546
* Customize response preview
545
547
* Per-request settings
548
+
* Null-handling variables, e.g. using null-conditional or nullish coalescing operators (this is also unsupported in Visual Studio Code)
0 commit comments