-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[BridgeFactory.php] Add RSSBRIDGE_WHITELIST environment variable support #2058
Conversation
This is integrated in #2100 |
Your PR looks more complete, I'll decline mine if yours it gets merged. |
Fixed by #2100 |
@gileri, can we get this reopened? |
I can see the advantage in this pr. But the container/environment still must be restarted for new env vars to take effect. An alternative: diff --git a/config.default.ini.php b/config.default.ini.php
index c1627aac..ae96d108 100644
--- a/config.default.ini.php
+++ b/config.default.ini.php
@@ -12,6 +12,8 @@
; timezone = "UTC" (default)
timezone = "UTC"
+enabled_bridges = Gettr Vimeo
+ |
If we add it to the config, wouldn't that make it more confusing as to where to actually configure the whitelisted bridges? because then we would have the whitelist.txt and also the config. One of the reasons for doing it through the environment variable was also to make it easier to deploy to heroku et al. I dont have a strong feeling either way, but we should come up with a strategy first before we add it to the config file. |
I think we should deprecate the usage of |
After having learnt about arrays in ini files it should be done like this:
For the env var, they cant be arrays. They are strings. Not sure how to handle that. Maybe space separated:
|
So do you want 3 options? whitelist.txt Do you want them to all add up? |
Yeah I think all config should be in |
overshadow meaning replace? or just add. So if I have a whitelist with BridgeA, an ini selection of BridgeB and BridgeC and an env variable of BridgeA and BridgeD, should A B C and D be selected? |
Had not thought about that. I mean replace yes. |
So in my example, only A and D would be selected since B and C are only in the .ini and you want that replaced? I think thats very complicated. A simple addition would make more sense for the users I think. Its also how most other things work. Access rights are usually additive and in this case I would see it as "bridges a user has access to". |
What you think @gileri ? |
Enabling/disabling bridges via the
whitelist.txt
file can be cumbersome in some setups, for example in containers. This PR introduces aRSSBRIDGE_WHITELIST
environment variable that accepts a wildcard (*
) or bridges names separated by a comma instead of newlines.After merging, the Whitelisting and Docker will need to be updated.
Edit : I'm of course open to modifications regarding the environment variable name or other changes.