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
Base path config option is not included in REST API responses when using non-default domains #990
Comments
BASE_PATH should work for all domains. If it's not, it's probably a bug. I'll investigate this. I'm thinking that maybe the bug is just on composing the URL after creating it. You mention that, when providing the domain, the response says the short URL is something in the lines of |
ha, funny, you nailed it. Although |
Thanks for confirming. It's a smaller issue then. |
nice, i really appreciate your investigation! if the listing would also include the BASE_PATH for every domain, I'd be very happy |
Yep, definitely, that needs to be fixed. I just wanted to confirm exactly what was the issue. |
Hey @sgohl. I have been testing this and I can't manage to reproduce it. For me it is working as expected. If I provide the I have followed these steps:
After this, the response includes the Could it be that you are doing something differently? Maybe you are not properly providing the env var to the shlink container, but just to traefik, which in turn properly redirects the request to Shlink but stripping-off the path? |
I'm stupid. The issue was reproducible only when using custom domains. Ignore my previous comment 😅 |
I reproduced it and fixed it. It will work as expected in v2.6.0 |
thanks so much for your efforts, really appreciate! I'll test and verify as soon as I find a 2.6.0 release/docker image |
Hey @sgohl, I released v2.6.0 yesterday, which includes the fix for this. Give it a try and let me know if there's anything not working as expected. |
I recently opened a feature request #989
The answer based on the assumption of serving the app on the
BASE_PATH
, which isn't actually the problem really.I have NOT set
SHORT_DOMAIN_HOST
anymore on purpose (which didn't make a difference anyway).I need multiple domains and a fixed suffix prepended before the
short_code
on generating the shortcodeThis is not related to serving the server-side app in a sub-URI-path.
example:
the actual generated short-URL is
https://myprimeportal.com/mKM9r
instead of what I want:
https://myprimeportal.com/s/mKM9r
Error:
It does not accept
/s
within domain key. But giving the default domain exactly this way with appended/s
, it works.if I edit mysql table
short_urls
and prepends/
to fieldshort_code
, the app will list the wanted short-URL in the web-dashboardThis (appended
BASE_PATH
) only works with single domain, but not if you send a custom domain in the payload, then thes/
is missing from the generated shortURL response.any ideas ?
(using the docker
shlink:stable
behind traefik:v1 withPathPrefix:/s/
andBASE_PATH=/s
)EDIT:
BASE_PATH
should be appended to all domains, not only the default domain; OR; make possible to payload a domain with URI pathThe text was updated successfully, but these errors were encountered: