Tiny Tiny RSS: Community

Why does ttrss enforce SELF_URL_PATH?

Why does ttrss require users to set a SELF_URL_PATH? Many other web apps can be accessed by any URL and don’t care what that URL is. The web server listens for the domain name that the administrator specifies, and it serves the files the URL requests. The app itself never cares exactly what the URL is since it uses relative paths in its code. Could you enlighten me about why ttrss does this, and whether you think it would be an improvement to remove that behavior?

I can say from personal experience that it would make things much easier for ttrss users to install and configure in their environments if ttrss didn’t fight against them about which URL they used to access it.

Thanks,
Jeremy

You can disable that check with define('_SKIP_SELF_URL_PATH_CHECKS', true);
So it is not actually forced but highly recommended, “many other web apps” like nextcloud also need a domain set in their configuration.

so we would know where to safely redirect you on login, etc. also some parts of tt-rss don’t have access to HTTP server variables and they might need to know your own URL.

as posted above, you can disable this check, but if you run into issues afterwards, you get to deal with them yourself.

e: also i don’t think setting SELF_URL_PATH once properly can be considered fighting. tt-rss even tells you a (usually) correct value for this setting.

additionally, 1) why is this in development? 2) for the love of god don’t sign your posts

Indeed, tt-rss is great for giving us the correct setting.

I don’t see why ttrss can’t use relative paths in the code everywhere, but after reading a bunch of your other forum posts, I can tell that you know what you’re doing so I won’t argue.

The fighting was a bunch of trial and error to try to find some combination that works: changing SELF_URL_PATH, nginx location string, nginx proxy_pass string, editing physical files on the html volume, etc. In the end, I gave up and left the tt-rss subdirectory because the only other way for me to fix it is to create my own custom dockerfile, which isn’t worth it for a cosmetic change.

  1. I thought it was a developer question since it’s about why the code was written a certain way.

  2. Curious. I hate long signatures with graphics, famous quotes, and nonsense too, but a simple “thanks, [name]” just seems polite for an introductory post that requests free help from a stranger. Now I wonder what the typical etiquette rule is for other forums around the internet. Looks like some Discourse board operators like them, and some don’t.


Jeremy McFly

34/M/USA

"Believe you can and you’re halfway there.” – Theodore Roosevelt

“ah yes an excellent idea.” fox in reply to Jeremy11one, 2020

“Adopting the right attitude can convert a negative stress into a positive one.” – Hans Selye

Dell
MB
CPU
RAM
HDD
GPU
Lights
MOre LiGhts!
Fans
upgraded thumb screws on the back

<funny GIF from 3 years ago>

^ okay, that made me laugh. :+1:

Aaaaand I love this thread. This is real Reddit “Maybe, Maybe, Maybe” territory.