mirror of
https://github.com/torproject/lego.git
synced 2024-11-23 09:39:44 +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
|
type = string
|
||||||
description = Target is of type 'string' to allow relative paths. Converted to url in the template.
|
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]
|
[fields.key]
|
||||||
label = Key
|
label = Key
|
||||||
type = sort_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 }}'" />
|
<meta http-equiv="refresh" content="0; URL='{{ this.target|url }}'" />
|
||||||
|
{% endif -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user