Skip to content

Wakapi URL (domain with subpath) does not work #1026

@dashezup

Description

@dashezup

Describe the bug
There is api_domain parameter for wakatime card, but it does not work with custom wakapi instances with subpath in the API base URL. When the one self-host wakapi the usual way is reverse proxy the app to a subpath of a HTTPS site.
assume the wakapi instant can be accessed from https://domain.tld/wakapi/
api access: https://domain.tld/wakapi/api/v1/users/{username}/stats/{range}

neither including / (slash) nor %2F work.

https://github-readme-stats.vercel.app/api/wakatime?username=username&api_domain=domain.tld%2Fwakapi&range=last_7_days
it shows:

Something went wrong! file an issue at https://git.io/JJmN9 Cannot read property 'status' of undefined

Expected behavior
Return the wakatime card when api_domain is a URL which contains slash

Additional context
maybe add api_base_url?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions