apply custom config to lib settings
Merge pull request #4519 from YaoHuiJi/master

fix the issue: Foundation Configuration doesn't  work