Much faster version of get_config_header