[Panel] How to set different preview URLs for different environments (configs)

I’m needing a way to set different preview URLs for different environments.

My initial attempt was to set something like 'previewRoot' => 'http://localhost:9000' in config.127.0.0.1.php and 'previewRoot' => 'https://mysite.com' in config.php. Then, use previewRoot in the blueprint files to dynamically build the specific preview. However, it doesn’t seem that these variables defined in the config.php file are available in blueprints (perhaps they are, under a specific namespace?).

Any thoughts on how to make this approach work or a more preferable approach?

How did you try to use it in the blueprint?

  preview: "{{ kirby.option('previewRoot') }}"

should work.

That worked(!). Thank you, @texnixe.