Any idea why setting the `api_domain` on my python backend to be an AWS Public IPv4 DNS address is t...
a
Any idea why setting the
api_domain
on my python backend to be an AWS Public IPv4 DNS address is throwing this error?
Copy code
Traceback (most recent call last):
  ...
  File "/home/andrew/PycharmProjects/reminderFastApi/venv/lib/python3.10/site-packages/supertokens_python/__init__.py", line 35, in init
    return Supertokens.init(
  File "/home/andrew/PycharmProjects/reminderFastApi/venv/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 209, in init
    Supertokens.__instance = Supertokens(
  File "/home/andrew/PycharmProjects/reminderFastApi/venv/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 157, in __init__
    self.app_info = AppInfo(
  File "/home/andrew/PycharmProjects/reminderFastApi/venv/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 108, in __init__
    self.top_level_api_domain = get_top_level_domain_for_same_site_resolution(
  File "/home/andrew/PycharmProjects/reminderFastApi/venv/lib/python3.10/site-packages/supertokens_python/utils.py", line 279, in get_top_level_domain_for_same_site_resolution
    raise Exception(
Exception: Please make sure that the apiDomain and websiteDomain have correct values
here are the domains:
Copy code
API_DOMAIN='http://ec2-18-XXX-XXX-145.compute-1.amazonaws.com'
WEBSITE_DOMAIN='https://www.reminderloop.com'
using the exact same settings on my front end seems fine (no error)
here's my supertokens_python version:
r
@KShivendu can help here
k
@andrewbyrley it's happening because tldextract library isn't handling
ec2-xx-yyy-zzz-0.compute-1.amazonaws.com
, which is a bit suprising. I'll look into this but in the the meantime, you can use the normal public ipv4 address (ex:
54.172.238.0
)
a
thanks! that seems to work. AWS is about to start charging for public IP addresses, so I was hoping this would be a work around.
r
can you open an issue about this on our python github? We will have a look when we have time and it will be easier for you to keep track as well.
a
here's the issue for anyone following along at home: https://github.com/supertokens/supertokens-python/issues/394
r
thanks
37 Views