.env Property Arrays |
It would be nice to be able to specify non associative arrays like this:
PHP Code: contentsecuritypolicy.scriptSrc = 'self' PHP Code: public $scriptSrc = [ Maybe CI does this already? I haven't actually tried it. If it does then the CI manual should mention it. Maybe contentsecuritypolicy.0 = 'self' and xxxx.1 = 'abcd', xxxx.2 = 'xyzt' would be necessary.
Simpler is always better
Yes, if you have the array key in the Config file, you can override it by .env.
See https://codeigniter4.github.io/CodeIgnit...s-for-data The following way is impossible. Because we cannot set environment variable like that. Code: contentsecuritypolicy.scriptSrc = 'self' It is equal to Code: contentsecuritypolicy.scriptSrc = 'https://stage-bnc4-web7.bsg.na.baesystems.com'
10-25-2023, 03:01 AM
(This post was last modified: 10-25-2023, 03:02 AM by donpwinston. Edit Reason: typo )
How about:
contentsecuritypolicy.scriptSrc.0 = 'self' contentsecuritypolicy.scriptSrc.1 = 'https://banruptcynotices.uscourts.gov' or some sort of macro like syntax?
Simpler is always better
(10-23-2023, 05:11 PM)kenjis Wrote: Yes, if you have the array key in the Config file, you can override it by .env. Code: contentsecuritypolicy.scriptSrc.0 = 'self'
Simpler is always better
Yes, you can replace the existing elements in the Config class.
But you cannot add an element in the array. So the following does not work. Code: contentsecuritypolicy.scriptSrc.5 = new_value |
Welcome Guest, Not a member yet? Register Sign In |