A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

20 righe
516 B

  1. package writefreely
  2. import (
  3. "fmt"
  4. "net/http"
  5. )
  6. func handleViewHostMeta(app *app, w http.ResponseWriter, r *http.Request) error {
  7. w.Header().Set("Server", serverSoftware)
  8. w.Header().Set("Content-Type", "application/xrd+xml; charset=utf-8")
  9. meta := `<?xml version="1.0" encoding="UTF-8"?>
  10. <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  11. <Link rel="lrdd" type="application/xrd+xml" template="https://` + r.Host + `/.well-known/webfinger?resource={uri}"/>
  12. </XRD>`
  13. fmt.Fprintf(w, meta)
  14. return nil
  15. }