I’ve created an API mapping for a custom domain, a...
# sst
a
I’ve created an API mapping for a custom domain, and this works fine. But I want to define
GET /careers
, and doesn’t seams to be possible? the URL will be
/careers/
.. notice the
/
at the end. Is there a way to tell the API to map
/careers
and
/careers/
? Also, is there any convention, or best practice on this topic? I have been defining APIs without the ending
/
all my life, but maybe is not correct.
f
Hey @Adrián Mouly, yeah I noticed this too the other day,
/careers
works in API v1, but in v2 you need the trailing slash
/careers/
a
Omg 😞
Isn’t a way to put
{root}
. or something like that?
Like some sort of wildcard?
f
hmm.. i haven’t tried it.. but i don’t think it’s possible
a
So this creates a breaking change between v1 and v2.
Is that documented somewhere?
f
u man mapping to
{root}
base path right?
a
Not sure what you mean.
f
Sorry, I must have misunderstood what you mean by
{root}
lol
a
@Frank what I meant is… maybe there is a flag or wildcard that can map
/careers
which is the main path of the domain to
{something}
.
I think I saw that on other frameworks/libs.
API construct is managed by SST? what about the API GW construct, do they allow to use the root without
/
?