diff options
author | FChannel0 <77419041+FChannel0@users.noreply.github.com> | 2021-05-31 09:39:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-31 09:39:01 +0000 |
commit | 29d1a7074434ff807648e51d70e1d37c1e0a6cc9 (patch) | |
tree | 984ff43ba8b78c20973511749e8c30b22dbd0c54 /main.go | |
parent | 13fddffc60b9cd6350e888ea4e92745a58e1f256 (diff) | |
parent | 45aaf27bcb676e245371bf46b710ab498cdcfcb5 (diff) |
Merge pull request #13 from knotteye/master
Better accept header parsing
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -33,7 +33,6 @@ var SiteEmailPassword = GetConfigValue("emailpass") var SiteEmailServer = GetConfigValue("emailserver") //mail.fchan.xyz var SiteEmailPort = GetConfigValue("emailport") //587 -var ldjson = "application/ld+json" var activitystreams = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"" func main() { @@ -135,7 +134,7 @@ func main() { } if mainActor { - if accept == activitystreams || accept == ldjson { + if acceptActivity(accept) { GetActorInfo(w, db, Domain) return } @@ -178,7 +177,7 @@ func main() { } if actorMain || actorMainPage { - if accept == activitystreams || accept == ldjson { + if acceptActivity(accept) { GetActorInfo(w, db, actor.Id) return } @@ -266,7 +265,7 @@ func main() { //catch all if actorPost { - if accept == activitystreams || accept == ldjson { + if acceptActivity(accept) { GetActorPost(w, db, path) return } |