Skip to content
Merged
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
9 changes: 9 additions & 0 deletions internal/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,15 @@ func SetupRouter(cfg *config.Config, database *gorm.DB) *gin.Engine {
r.GET("/.well-known/oauth-protected-resource", oauthHandler.ProtectedResourceMetadata)
r.GET("/.well-known/oauth-protected-resource/mcp", oauthHandler.ProtectedResourceMetadata)

// OpenAI ChatGPT Apps domain-ownership challenge: OpenAI's app submission
// requires this token served at the origin-root well-known URL to prove we own
// api.saltybytes.ai. Not a secret (it only proves domain control). Update the
// value if OpenAI regenerates the challenge.
r.GET("/.well-known/openai-apps-challenge", func(c *gin.Context) {
c.Header("Cache-Control", "public, max-age=300")
c.String(200, "4SSk8_oTN5kuGjpWyiU2wO4yEHrbg_vL6k23-kRhtvs")
})

// Dynamic client registration + login/consent get the same tight per-IP
// limits as the public auth endpoints (credential stuffing / spam guard).
r.POST("/oauth/register", middleware.RateLimitByIP(5, 10, 5*time.Minute, 15*time.Minute), oauthHandler.RegisterClient)
Expand Down
Loading