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: content/waf/configure/nginx-features.md
+1-101Lines changed: 1 addition & 101 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ It is intended as a reference for small, self-contained examples of how F5 WAF f
17
17
18
18
Important constraints when F5 WAF for NGINX is enabled:
19
19
20
-
- Subrequest-based modules (NGINX modules that create internal HTTP subrequests) are not inspected in any scope block where **app_protect_enable on** is set. F5 WAF for NGINX inspects only direct, client-facing HTTP requests.
20
+
- Subrequest-based modules (modules that create internal HTTP subrequests) are not supported in the same configuration scope as **app_protect_enable on**. F5 WAF for NGINX inspects only the client-facing request in the scope where it is enabled; internal subrequests fall outside that scope and are not inspected.
21
21
- Modules that require the HTTP Range header are not supported in the same configuration scope as **app_protect_enable on**. Place Range-dependent configuration in a server or location block without F5 WAF for NGINX enabled.
22
22
23
23
For additional information on configuring NGINX, you should view the [NGINX documentation]({{< ref "/nginx/" >}}).
@@ -148,106 +148,6 @@ http {
148
148
}
149
149
```
150
150
151
-
### Enable WAF on an njs module using the subrequest mechanism
152
-
153
-
This configuration example shows how to enable WAF on an njs module that relies on the subrequest mechanism.
return 200 "Hello! I got your URI request - $request_uri\n";
199
-
}
200
-
}
201
-
}
202
-
```
203
-
204
-
{{% /tab %}}
205
-
206
-
{{% tab name="example.js" %}}
207
-
208
-
```js
209
-
asyncfunctionfetch_subrequest(r) {
210
-
let reply =awaitr.subrequest('/<script>');
211
-
let response = {
212
-
uri:reply.uri,
213
-
code:reply.status,
214
-
body:reply.responseText,
215
-
};
216
-
r.return(200, JSON.stringify(response));
217
-
}
218
-
219
-
exportdefault {join};
220
-
```
221
-
222
-
{{% /tab %}}
223
-
224
-
{{< /tabs >}}
225
-
226
-
If the njs handler triggers an internal subrequest to `/<script>`, it is not inspected by F5 WAF for NGINX and succeeds:
227
-
228
-
```shell
229
-
curl "localhost/"
230
-
```
231
-
232
-
```text
233
-
{"uri":"/<script>","code":200,"body":"Hello! I got your URI request - /foo//\n"}
234
-
235
-
```
236
-
237
-
However, if a direct, client-facing request attempts to trigger the same URL, it is inspected by F5 WAF for NGINX and is blocked according to the security policy.
238
-
239
-
```shell
240
-
curl "localhost/<script>"
241
-
```
242
-
243
-
```text
244
-
<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.
Features that add or depend on the HTTP Range header are unsupported in the same scope as __app_protect_enable on__. Place Range-dependent logic in a separate scope that does not enable F5 WAF for NGINX, and have the F5 WAF for NGINX enable frontend proxy to that backend.
0 commit comments