You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2020/05/09 20:13:32 UTC

[trafficserver-ingress-controller] branch master updated: Update snippet example

This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 703a47e  Update snippet example
     new cccd480  Merge pull request #2 from shukitchan/master
703a47e is described below

commit 703a47eaae0bb9d7d373455fefd7656038d8abec
Author: shukitchan <ki...@apache.org>
AuthorDate: Sat May 9 13:11:54 2020 -0700

    Update snippet example
---
 k8s/ingresses/ats-ingress-2.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/k8s/ingresses/ats-ingress-2.yaml b/k8s/ingresses/ats-ingress-2.yaml
index ef49f92..e9abdfc 100644
--- a/k8s/ingresses/ats-ingress-2.yaml
+++ b/k8s/ingresses/ats-ingress-2.yaml
@@ -30,6 +30,12 @@ metadata:
     ats.ingress.kubernetes.io/server-snippet: |
       ts.debug('Debug msg example')
       ts.error('Error msg example')
+      -- ts.hook(TS_LUA_HOOK_SEND_RESPONSE_HDR, function()
+      --   ts.client_response.header['Location'] = 'https://test.edge.com/app2'
+      -- end)
+      -- ts.http.skip_remapping_set(0)
+      -- ts.http.set_resp(301, 'Redirect')
+      ts.debug('Uncomment the above lines to redirect http request to https')
 spec:
   rules:
   - host: test.edge.com