mirror of https://github.com/writeas/writefreely
A focused writing and publishing space.
https://write.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
516 B
20 lines
516 B
6 years ago
|
package writefreely
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func handleViewHostMeta(app *app, w http.ResponseWriter, r *http.Request) error {
|
||
|
w.Header().Set("Server", serverSoftware)
|
||
|
w.Header().Set("Content-Type", "application/xrd+xml; charset=utf-8")
|
||
|
|
||
|
meta := `<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
|
||
|
<Link rel="lrdd" type="application/xrd+xml" template="https://` + r.Host + `/.well-known/webfinger?resource={uri}"/>
|
||
|
</XRD>`
|
||
|
fmt.Fprintf(w, meta)
|
||
|
|
||
|
return nil
|
||
|
}
|