mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 18:24:35 +03:00
add subcommand that prints licenses, and link to licenses from the webadmin/webaccount/webmail interfaces
This commit is contained in:
@ -211,6 +211,14 @@ func handle(apiHandler http.Handler, isForwarded bool, w http.ResponseWriter, r
|
||||
http.Error(w, "405 - method not allowed - use get", http.StatusMethodNotAllowed)
|
||||
}
|
||||
return
|
||||
} else if r.URL.Path == "/licenses.txt" {
|
||||
switch r.Method {
|
||||
case "GET", "HEAD":
|
||||
mox.LicensesWrite(w)
|
||||
default:
|
||||
http.Error(w, "405 - method not allowed - use get", http.StatusMethodNotAllowed)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
isAPI := strings.HasPrefix(r.URL.Path, "/api/")
|
||||
|
@ -1016,7 +1016,7 @@ const crumbs = (...l) => {
|
||||
];
|
||||
};
|
||||
const errmsg = (err) => '' + (err.message || '(no error message)');
|
||||
const footer = dom.div(style({ marginTop: '6ex', opacity: 0.75 }), link('https://www.xmox.nl', 'mox'), ' ', moxversion);
|
||||
const footer = dom.div(style({ marginTop: '6ex', opacity: 0.75 }), link('https://www.xmox.nl', 'mox'), ' ', moxversion, ', ', dom.a(attr.href('licenses.txt'), 'licenses'));
|
||||
const domainName = (d) => {
|
||||
return d.Unicode || d.ASCII;
|
||||
};
|
||||
|
@ -209,6 +209,7 @@ const footer = dom.div(
|
||||
link('https://www.xmox.nl', 'mox'),
|
||||
' ',
|
||||
moxversion,
|
||||
', ', dom.a(attr.href('licenses.txt'), 'licenses')
|
||||
)
|
||||
|
||||
const domainName = (d: api.Domain) => {
|
||||
|
Reference in New Issue
Block a user