DynamicScriptMiddleware.ReturnScript method
Returns a dynamic script by its key. A missing script gets a 404 response. A script the user may not access gets a 403 response if the user is logged in, and the same 404 response as a missing script otherwise, so that an anonymous visitor can't tell which script keys (e.g. forms and lookups) exist.
public static Task ReturnScript(HttpContext context, string scriptKey, string contentType,
bool json)
| parameter | description |
|---|---|
| context | The HTTP context. |
| scriptKey | The script key. |
| contentType | The content type. |
| json | true to return JSON. |
See Also
- class DynamicScriptMiddleware