A Traefik middleware plugin that adds an 'epoch-seconds' header to HTTP responses, containing the current Unix time in seconds.milliseconds
format (similar to Nginx $msec
).
NOTE: Headername is configurable or else the default is set as epoch-seconds.
Enable experimental plugins and specify this plugin:
experimental:
plugins:
timestamp-injector:
moduleName: github.com/helpshift/timestamp-injector
version: v1.0.0
Create the middleware:
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: mytimestamp-middleware
namespace: my-namespace
spec:
plugin:
timestamp-injector: {}
# OR
#timestamp-injector:
# HeaderName: mytimestamp-header
This plugin injects a header into each response with the current Unix time (seconds.milliseconds).