Skip to content

[BUG] Links do not expire after the set expire_after time. #185

Description

@HDudz

Describe the bug

Links do not expire after the set expire_after time. The link continues to redirect normally even after the expiration time has passed. This was tested both via the website UI and the API.

To Reproduce

Steps to reproduce the behavior:

  1. Create a shortened URL with expire_after set to a time in the near future (e.g. 1-2 minutes ahead)
  2. Wait until the expiration time passes
  3. Visit the shortened link
  4. Link still works and redirects normally — no expiration occurs

Via API:

POST https://spoo.me/api/url
Content-Type: application/json
Authorization: Bearer {API_KEY}

{
  "long_url": "https://www.google.com",
  "expire_after": "2026-05-11T18:10:00Z"
}

Expected behavior

After the expire_after datetime passes, visiting the shortened link should result in an expiration/error page, not a redirect to the original URL.


Screenshots

Image

It's 20:18 in Poland so UTC+2, so 18:18 in UTC

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Brave (also tested via API / Postman)

Additional context

Below is a timeline proving the link was accessed after the expiration time:

API response after creating the link:

{
    "alias": "fDoMIzA",
    "short_url": "https://spoo.me/fDoMIzA",
    "long_url": "https://www.google.com",
    "owner_id": "6a020ec35746cac54b1da051",
    "created_at": 1778522988,
    "status": "ACTIVE",
    "private_stats": true
}

Note: the API response does not include expire_after in the returned object, which may indicate the field is being silently ignored.

Stats after clicking the link:

{
    "summary": {
        "first_click": "2026-05-11T18:10:49.343000Z",
        "last_click": "2026-05-11T18:10:49.343000Z"
    },
    "short_code": "fDoMIzA"
}

The link was set to expire at 2026-05-11T18:10:00Z and was successfully accessed at 2026-05-11T18:10:49Z49 seconds after the expiration time — and redirected normally.


For Developers/Contributors/Self-Hosters:

Test Environment:

N/A — tested against the hosted production instance at spoo.me


Logs & Error Messages

No error messages were returned by the API. The link creation request returned HTTP 200 with "status": "ACTIVE".

Code Snippets

{
  "long_url": "https://www.google.com",
  "expire_after": "2026-05-11T18:10:00Z"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions