upda/server/constants_api.go
Varakh 1fc3818d3c
All checks were successful
/ build (push) Successful in 5m3s
feature(api,release): prepare for next major release and switch to requiring content-type set to JSON for all incoming requests and expose more CORS environment variables
- Switched to enforce JSON as Content-Type for all incoming requests
- Switched to properly respond with JSON on page not found or method not allowed
- Renamed CORS_ALLOW_ORIGIN to CORS_ALLOW_ORIGINS
- Added CORS_ALLOW_CREDENTIALS which defaults to true
- Added CORS_EXPOSE_HEADERS which defaults to *
- Overhauled package visibility for server module
2024-06-10 20:03:25 +02:00

11 lines
243 B
Go

package server
const (
headerAppName = "X-App-Name"
headerAppVersion = "X-App-Version"
headerWebhookToken = "X-Webhook-Token"
headerContentType = "Content-Type"
headerContentTypeApplicationJson = "application/json"
)