No URL found with short code \"my-short-code\" #2448
-
Shlink version4.4.6 PHP version8.4.5 How do you serve ShlinkDocker image Database engineMySQL Database version5.7.30 Current behaviorWhen trying to make the API call below, the error
Expected behaviorI'm using a stable docker image, I think I may have configured something wrong. However, my URL works, and visits are counted normally. Minimum steps to reproduceI did a new installation from scratch, generated an API key, registered a URL and tried to see the visits. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I've already figured out what it is. My shlink is running behind a reverse proxy and apparently the application can't find the authoritative domain of the link. My container is called shlink, I have an nginx that exports 443 and 80. I do the following configuration for proxy_pass:
It turns out that I didn't find how to inform the docker container which are the trusted proxies... And that's why shlink must not be accepting the "X-*" headers. I tried to add the environment variable If I use the authoritative domain for shlink:8080 in the database, the APIs work and the error stops. However, the redirects start to fail. I will continue investigating how I can resolve this and as soon as it is resolved I will post the solution here. |
Beta Was this translation helpful? Give feedback.
-
I think I misunderstood. I'm testing the project via the develop branch here, and when I simulated it, it tells me for which domain the short URL was not found. In my post, it seems that the query param domain is ignored. |
Beta Was this translation helpful? Give feedback.
-
Guys, I destroyed the database and installed everything again. Apparently my problem was solved. I didn't use CLI and I did some manual registrations directly through the database. I must have entered something wrong (despite having reviewed the FKs). The strange thing is that now everything works but the database doesn't show the domain I configured lol.. But it was my mistake, not the software implementation. Sorry for the issue. |
Beta Was this translation helpful? Give feedback.
Guys, I destroyed the database and installed everything again.
Apparently my problem was solved.
I didn't use CLI and I did some manual registrations directly through the database.
I must have entered something wrong (despite having reviewed the FKs).
The strange thing is that now everything works but the database doesn't show the domain I configured lol..
But it was my mistake, not the software implementation. Sorry for the issue.