From 941465358e0e6196c33db02f96c823c266d0d6e3 Mon Sep 17 00:00:00 2001 From: Kevin Reynolds Date: Wed, 1 May 2024 17:02:38 -0400 Subject: [PATCH] manip ready to test --- labapp/app/markdown/manipulation.md | 80 ++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 6 deletions(-) diff --git a/labapp/app/markdown/manipulation.md b/labapp/app/markdown/manipulation.md index a5b9698..772cfc5 100644 --- a/labapp/app/markdown/manipulation.md +++ b/labapp/app/markdown/manipulation.md @@ -25,7 +25,7 @@ Configure a path prefix rewrite to remove part of the request p
  •     - Requests to "https://eph-ns.mcn-lab.f5demos.com/aws/raw" need to arrive at the origin with a path of "/raw" + Requests to https://eph-ns.mcn-lab.f5demos.com/aws/raw need to arrive at the origin with a path of /raw.
  • @@ -55,7 +55,7 @@ document.getElementById('requestBtn1').addEventListener('click', () => { }); -Since questions on this functionality are often asked on [F5 DevCentral](https://community.f5.com/), a hint might be warranted. +Since questions on this functionality are often asked on F5 DevCentral, a hint might be warranted.

    @@ -64,7 +64,7 @@ Since questions on this functionality are often asked on [F5 DevCentral](https:/

    - temp + temp
    @@ -76,9 +76,23 @@ Since questions on this functionality are often asked on [F5 DevCentral](https:/
    -### **Exercise 2: Header Shenanigans** +### **Exercise 2: Request Header Shenanigans** -Insert headers to identify +While blind header insertion or deletion is useful in some use cases, this exercise focuses on context aware header manipulation. +Use the XC Header Processing docs for reference. + +
    + +
      +
    • +     + Insert a request header named X-MCN-src-site to identifies the UDF CE to the origin. Do not use a static value. +
    • +
    • +     + Insert a request header named X-MCN-namespace to identifies the ephemeral namespace to the origin. Do not use a static value. +
    • +
    @@ -89,7 +103,11 @@ GET https://eph-ns.mcn-lab.f5demos.com/ HTTP/1.1 Host: eph-ns.mcn-lab.f5demos.com { - "env": "azure", + ... + "request_headers": { + "x-mcn-namespace": "wiggly-yellowtail", + "X-mcn-src-Site": "cluster-xxxxxxxx", + }, ... } ``` @@ -104,6 +122,56 @@ document.getElementById('requestBtn2').addEventListener('click', () => { }); +
    + +### **Exercise 3: Response Header Shenanigans** + +
    + +
      +
    • +     + Insert a response header named X-MCN-dst-site to determine which cloud CE processed the request. +
    • +
    + +
    + +#### **Test Criteria** + +
    + +This test will evaluate response headers. + +```http +GET https://eph-ns.mcn-lab.f5demos.com/aws HTTP/1.1 +Host: eph-ns.mcn-lab.f5demos.com + +{ + "x-mcn-dest-site": "student-awsnet" +} +``` + +```http +GET https://eph-ns.mcn-lab.f5demos.com/azure HTTP/1.1 +Host: eph-ns.mcn-lab.f5demos.com + +{ + "x-mcn-dest-site": "student-azurenet" +} +``` + +
    + +
    +
    + + + Nice 🚀! If you've completed all the exercises so far, you have a good foundation for how App Connect addresses common L7 MCN scenarios.