aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorTill Faelligen <2353100+S7evinK@users.noreply.github.com>2024-11-14 13:42:51 +0100
committerTill Faelligen <2353100+S7evinK@users.noreply.github.com>2024-11-14 13:42:51 +0100
commit79b87c7a08045a5b5c676b97cedd49250bff2237 (patch)
treed0716b0d3bcb85be2a05534bf1cab0597136b168 /internal
parent488009ca905be78c0cbd5364e879d61232b32868 (diff)
parent6cd1285ca0276bebd407110c37031bc4622f0b79 (diff)
Merge branch 'main' of github.com:matrix-org/dendriteHEADmain
Diffstat (limited to 'internal')
-rw-r--r--internal/httputil/httpapi.go6
-rw-r--r--internal/version.go2
2 files changed, 7 insertions, 1 deletions
diff --git a/internal/httputil/httpapi.go b/internal/httputil/httpapi.go
index 0559fbb7..034f19f1 100644
--- a/internal/httputil/httpapi.go
+++ b/internal/httputil/httpapi.go
@@ -210,6 +210,12 @@ func MakeExternalAPI(metricsName string, f func(*http.Request) util.JSONResponse
// This is used to serve HTML alongside JSON error messages
func MakeHTTPAPI(metricsName string, userAPI userapi.QueryAcccessTokenAPI, enableMetrics bool, f func(http.ResponseWriter, *http.Request), checks ...AuthAPIOption) http.Handler {
withSpan := func(w http.ResponseWriter, req *http.Request) {
+ if req.Method == http.MethodOptions {
+ util.SetCORSHeaders(w)
+ w.WriteHeader(http.StatusOK) // Maybe http.StatusNoContent?
+ return
+ }
+
trace, ctx := internal.StartTask(req.Context(), metricsName)
defer trace.EndTask()
req = req.WithContext(ctx)
diff --git a/internal/version.go b/internal/version.go
index 8616b82a..e5ff5af8 100644
--- a/internal/version.go
+++ b/internal/version.go
@@ -18,7 +18,7 @@ var build string
const (
VersionMajor = 0
VersionMinor = 13
- VersionPatch = 7
+ VersionPatch = 8
VersionTag = "" // example: "rc1"
gitRevLen = 7 // 7 matches the displayed characters on github.com