0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-01-20 22:52:51 -05:00
zot/pkg
Shivam Mishra b8010e1ee4 routes: changes required to do browser authentication
whenever we make a request that contains header apart from CORS allowed header, browser sends a preflight request
and in response accept *Access-Control-Allow-Headers*.

preflight request is in form of OPTIONS method, added new http handler func to set headers
and returns HTTP status ok in case of OPTIONS method.

in case of authorization, request contains authorization header
added authorization header in Access-Control-Allow-Headers list

added AllowOrigin field in HTTPConfig this field value is set to Access-Control-Allow-Origin header and will give zot adminstrator to limit incoming request.

Signed-off-by: Shivam Mishra <shimish2@cisco.com>
2022-03-08 17:42:54 -08:00
..
api routes: changes required to do browser authentication 2022-03-08 17:42:54 -08:00
cli test: use T.TempDir to create temporary test directory 2022-03-07 12:28:49 -08:00
common sync: periodically retry if on-demand fails inline, closes #281 2022-02-07 09:04:13 -08:00
compliance test: use T.TempDir to create temporary test directory 2022-03-07 12:28:49 -08:00
exporter test: use T.TempDir to create temporary test directory 2022-03-07 12:28:49 -08:00
extensions routes: changes required to do browser authentication 2022-03-08 17:42:54 -08:00
log test: use T.TempDir to create temporary test directory 2022-03-07 12:28:49 -08:00
storage test: use T.TempDir to create temporary test directory 2022-03-07 12:28:49 -08:00
test test: use T.TempDir to create temporary test directory 2022-03-07 12:28:49 -08:00