Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Change Log

# 2024-05-02 - Version 0.6.3
## UNRELEASED

- Add CORS support to all endpoints [#171](https://github.com/gohypermode/runtime/pull/171)

## 2024-05-02 - Version 0.6.3

- Update metrics collection to remove labels [#163](https://github.com/gohypermode/runtime/pull/163)
- Add environment and version to health endpoint [#164](https://github.com/gohypermode/runtime/pull/164)
- Capture function execution duration in metrics [#165](https://github.com/gohypermode/runtime/pull/165)

# 2024-04-29 - Version 0.6.2
## 2024-04-29 - Version 0.6.2

- Traces and non-user errors are now sent to Sentry [#158](https://github.com/gohypermode/runtime/issues/158)
- Fix OpenAI text generation [#161](https://github.com/gohypermode/runtime/issues/161)

# 2024-04-26 - Version 0.6.1
## 2024-04-26 - Version 0.6.1

- Fix GraphQL error when resulting data contains a nested null field [#150](https://github.com/gohypermode/runtime/issues/150)
- Fix GraphQL error when resolving `__typename` fields; also add `HYPERMODE_TRACE` debugging flag [#151](https://github.com/gohypermode/runtime/issues/151)
Expand All @@ -20,7 +24,7 @@
- Note: It works correctly for system-generated and user-generated (`ctrl-C`) terminations, but [not when debugging in VS Code](https://github.com/golang/vscode-go/issues/120).
- Add version awareness [#155](https://github.com/gohypermode/runtime/issues/155)

# 2024-04-25 - Version 0.6.0
## 2024-04-25 - Version 0.6.0

Baseline for the change log.

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
github.com/joho/godotenv v1.5.1
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/common v0.48.0
github.com/rs/cors v1.11.0
github.com/rs/xid v1.5.0
github.com/rs/zerolog v1.32.0
github.com/stretchr/testify v1.9.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po=
github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0=
Expand Down
5 changes: 4 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"hmruntime/logger"
"hmruntime/metrics"
"hmruntime/utils"

"github.com/rs/cors"
)

// shutdownTimeout is the time to wait for the server to shutdown gracefully.
Expand Down Expand Up @@ -84,7 +86,8 @@ func GetHandlerMux() http.Handler {
// Also register the health endpoint, un-instrumented.
mux.HandleFunc("/health", healthHandler)

return mux
// Add CORS support to all endpoints.
return cors.Default().Handler(mux)
}

func healthHandler(w http.ResponseWriter, r *http.Request) {
Expand Down