mirror of
https://github.com/torproject/lego.git
synced 2024-11-23 01:29:45 +00:00
support external URLs in redirect template
for tpo/tpa/team#41687
This commit is contained in:
parent
ce5d6409f6
commit
6778dfc45f
@ -6,6 +6,12 @@ label = Redirect Target
|
||||
type = string
|
||||
description = Target is of type 'string' to allow relative paths. Converted to url in the template.
|
||||
|
||||
[fields.external]
|
||||
label = External URL
|
||||
type = boolean
|
||||
description = Target is an external (absolute) URL.
|
||||
default = false
|
||||
|
||||
[fields.key]
|
||||
label = Key
|
||||
type = sort_key
|
||||
|
@ -1 +1,5 @@
|
||||
{% if this.external -%}
|
||||
<meta http-equiv="refresh" content="0; URL='{{ this.target }}'" />
|
||||
{%- else -%}
|
||||
<meta http-equiv="refresh" content="0; URL='{{ this.target|url }}'" />
|
||||
{% endif -%}
|
||||
|
Loading…
Reference in New Issue
Block a user