I'm using Joomla 3.9.18 and I've got a project including a component and a couple of modules. I've got a couple of variables that are the same throughout the whole project (like some prefixes and a path to an image server), but now when I need to change them, I need to change them everywhere. I want to define these variables in one spot so I only need to change them there.
Where do I define variables like these and how can I access them in my component and modules?
I know configuration.php isn't an option because of core-hacks. I've read something about component options, but I'm still fairly new so I don't really understand how it works. Is this the way to go? And if yes, how does it work (easily explained)?