Skip to main content

APP_URL

Constant APP_URL 

Source
pub const APP_URL: &str = "APP_URL";
Expand description

Name of the Worker variable holding the app’s public address, https://shop.example.com, for links in emails.

Rails’ default_url_options[:host] (and asset_host): url joins it with a path, so mailers and jobs, which may run outside any request, build absolute links and image URLs. Set it as APP_URL: bindings.text("https://shop.example.com") in worker.env of cloudflare.config.ts, and APP_URL=http://localhost:8787 in .dev.vars.

§Examples

assert_eq!(ocre::mail::APP_URL, "APP_URL");