A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

20 rindas
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. }