Force Https In Sitemap

how can i force sitemap.xml generation to be https links while site is not..

site is backed on cloudflare as http but cloudflare handles all https..

so i need to keep like that to prevent loops.

but then i generate http links and stuff so i need to force the code.

looked in fn.url fn.common etc can't figure it out

/app/addons/google_sitemap

replace (about 6 times)

fn_get_storefront_protocol()

with

'https'

Then regenerate sitemap

/app/addons/google_sitemap

replace (about 6 times)

fn_get_storefront_protocol()

with

'https'

Then regenerate sitemap

I did as you said. there were six of this fn_get_storefront_protocol() and changed to https but still all the url are http and it hurt the google rating and it shows redirecting all the sites since I change it to full site to https

Please am I missing anything, what else should I do?

Thank you so much

Albert