Skip to content

Prevent trailing slashes in url. #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This is the changelog for [Authress SDK](readme.md).
* Add missing `If-Unmodified-Since` support to the `update_group` in the `Groups` API.
* Improve caching in `verify_token`
* Support additionally pydantic v2 dependencies. Support for v1 will be removed in a future version.
* Prevent unnecessary extra trailing slashes in domain name.

## 2.0 ##
* Add support for users and groups at the statement level of access records.
Expand Down
3 changes: 3 additions & 0 deletions authress/authress_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from __future__ import absolute_import

import json
import re

from authress.api.applications_api import ApplicationsApi
from authress.api.connections_api import ConnectionsApi
from authress.api.extensions_api import ExtensionsApi
Expand All @@ -23,6 +25,7 @@
class AuthressClient(object):
def __init__(self, authress_api_url=None, service_client_access_key=None):
self._host = authress_api_url if authress_api_url.startswith('http') else f"https://{authress_api_url}"
self._host = re.sub(r'/+$', '', self._host)
self._token_verifier = token_verifier.TokenVerifier()
self._http_client = HttpClient(host=self._host, access_key=service_client_access_key)

Expand Down
Loading