Sign inSign up

t13a/tdurl

By t13a

Updated about 2 years ago

Time dependent URL redirect generator

Image
0

4.2K

t13a/tdurl repository overview

tdurl

tdurl is a time-dependent URL redirect generator.

Getting Started

Start server:

$ docker run --rm -p 8991:8991 t13a/tdurl

Request URL:

$ curl -D - http://localhost:8991/?f=http://example.com/%25Y/%25m/%25d

Then generate a redirection:

HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Location: https://example.com/2018/07/04
Date: Wed, 04 Jul 2018 07:40:56 GMT
Content-Length: 53

<a href="https://example.com/2018/07/04">Found</a>.

It is possible to specify the time zone and offset time:

$ curl -D - http://localhost:8991/Asia/Tokyo?f=http://example.com/%25Y/%25m/%25d&o=1h

By default, the time zone is assumed as UTC.

Query parameters

NameDescriptionDefault value
fFormat stringN/A
oOffset time in Duration0s

Format syntax

Similar to date UNIX command. Percent-encoding is needed.

PlaceholderDescription
%dDay of month (01 .. 31)
%HHour (00 .. 23)
%mMonth (01 .. 12)
%MMinute (00 .. 59)
%sSeconds since 1970-01-01 00:00:00 UTC
%SSecond (00 .. 60)
%YYear (eg: 2018)

Tag summary

Content type

Image

Digest

sha256:2ff5500c6

Size

7.1 MB

Last updated

about 2 years ago

docker pull t13a/tdurl