Skip to content

Commit 56c6072

Browse files
authored
remove bad escapement
1 parent cb699b1 commit 56c6072

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

bookinfo-example/README.md

+15-17
Original file line numberDiff line numberDiff line change
@@ -209,24 +209,22 @@ scopes. This section demonstrates how to leverage the Authservice to relay the a
209209
1. Patch `productpage` to forward authorization headers to other services.
210210
1. Clone https://github.com/istio/istio.
211211
1. Make the changes below and build the image using `/samples/bookinfo/src/productpage/Dockerfile`.
212-
213-
```diff
214-
diff --git a/samples/bookinfo/src/productpage/productpage.py b/samples/bookinfo/src/productpage/productpage.py
215-
index af5a411ea..722434405 100755
216-
--- a/samples/bookinfo/src/productpage/productpage.py
217-
+++ b/samples/bookinfo/src/productpage/productpage.py
218-
@@ -182,7 +182,9 @@ def getForwardHeaders(request):
219-
if 'user' in session:
220-
headers['end-user'] = session['user']
221-
222-
- incoming_headers = ['x-request-id', 'x-datadog-trace-id', 'x-datadog-parent-id', 'x-datadog-sampled']
223-
+ incoming_headers = ['x-request-id',
224-
+ 'x-datadog-trace-id', 'x-datadog-parent-id', 'x-datadog-sampled',
225-
+ 'authorization']
212+
```diff
213+
--- a/samples/bookinfo/src/productpage/productpage.py
214+
+++ b/samples/bookinfo/src/productpage/productpage.py
215+
@@ -182,7 +182,9 @@ def getForwardHeaders(request):
216+
if 'user' in session:
217+
headers['end-user'] = session['user']
218+
219+
- incoming_headers = ['x-request-id', 'x-datadog-trace-id', 'x-datadog-parent-id', 'x-datadog-sampled']
220+
+ incoming_headers = ['x-request-id',
221+
+ 'x-datadog-trace-id', 'x-datadog-parent-id', 'x-datadog-sampled',
222+
+ 'authorization']
223+
224+
# Add user-agent to headers manually
225+
if 'user-agent' in request.headers:
226+
```
226227
227-
# Add user-agent to headers manually
228-
if 'user-agent' in request.headers:
229-
```
230228
1. Tag and push the image created to an accessible registry.
231229
1. Replace the `productpage` image in `config/bookinfo-with-authservice-template.yaml` with the image built above.
232230
1. Reapply the deployment file.

0 commit comments

Comments
 (0)