S-137587 support appUi enabled flag and support custom-headers
configuration
