Flagsmith / Flagsmith/flagsmith

API: Treat URLs with and without trailing slash as identical

Open
#491 4 comments 0 reactions 1 assignee Claimed by @gagantrivedi View on GitHub
api improvement
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

Currently, any API calls without trailing `/` character returns default "Flagsmith API" response. This behavior is quite unusual in API world as its recommended to primarily accept API requests without trailing slash.

To quote a few articles:

> A trailing forward slash (/) should not be included in URIs. This is one the most important rules to follow as the last character within a URI’s path, a forward slash (/) adds no semantic value and may cause confusion. REST API’s should not expect a trailing slash and should not include them in the links that they provide to clients.

> As the last character within a URI’s path, a forward slash (/) adds no semantic value and may confuse. It’s better to drop it from the URI.

It would be great to treat requests with and without trailing slash as identical.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.