Skip to content

helpshift/timestamp-injector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Traefik Plugin - Timestamp Injector

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.

Static Configuration

Enable experimental plugins and specify this plugin:

experimental:
  plugins:
    timestamp-injector:
      moduleName: github.com/helpshift/timestamp-injector
      version: v1.0.0

Dynamic Configuration

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

How It Works

This plugin injects a header into each response with the current Unix time (seconds.milliseconds).

About

traefik plugin to add timestamp header

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages