silverstripe / cwp-core

CWP basic compatibility module
BSD 3-Clause "New" or "Revised" License
3 stars 12 forks source link

Cannot merge CWP_IP_BYPASS_BASICAUTH with an array of string values #64

Closed robbieaverill closed 5 years ago

robbieaverill commented 5 years ago

CWP 2.x

The default is to use CWP_IP_BYPASS_BASICAUTH as a string value for CwpBasicAuthMiddleware's whitelisted IPs.

If you want to merge in an array of custom IPs as well, you cannot do this because the string splitting on commas only works if the input so setWhitelistedIps() is a string.

It should work on all string values in an array as well.

Workaround is to use PHP logic in app/_config.php to achieve the same result.

cc @MasseyIsaako

robbieaverill commented 5 years ago

PR at https://github.com/silverstripe/cwp-core/pull/65