[#73] Add missed CORS

Allow X-Bearer-For-All-Users, X-Bearer-Lifetime headers.
Add CORS to /auth/bearer route.

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-10-06 17:40:14 +03:00 committed by Alex Vanin
parent b2fdb8c5f8
commit feaea15aa7
8 changed files with 247 additions and 1 deletions

View file

@ -100,6 +100,7 @@ func (a *API) Configure(api *operations.NeofsRestGwAPI) http.Handler {
api.OptionsAuthHandler = operations.OptionsAuthHandlerFunc(a.OptionsAuth)
api.AuthHandler = operations.AuthHandlerFunc(a.PostAuth)
api.OptionsAuthBearerHandler = operations.OptionsAuthBearerHandlerFunc(a.OptionsAuthBearer)
api.FormBinaryBearerHandler = operations.FormBinaryBearerHandlerFunc(a.FormBinaryBearer)
api.GetBalanceHandler = operations.GetBalanceHandlerFunc(a.Balance)