mirror of
https://github.com/clearml/clearml-server
synced 2025-03-03 10:43:10 +00:00
Add cookie configuration
This commit is contained in:
parent
5c8519be1e
commit
b5cc858494
@ -41,6 +41,27 @@
|
|||||||
|
|
||||||
# cookie containing auth token, for requests arriving from a web-browser
|
# cookie containing auth token, for requests arriving from a web-browser
|
||||||
session_auth_cookie_name: "trains_token_basic"
|
session_auth_cookie_name: "trains_token_basic"
|
||||||
|
|
||||||
|
# cookie configuration for authorization cookies generated by auth.login
|
||||||
|
cookies {
|
||||||
|
httponly: true # allow only http to access the cookies (no JS etc)
|
||||||
|
secure: false # not using HTTPS
|
||||||
|
domain: null # Limit to localhost is not supported
|
||||||
|
max_age: 99999999999
|
||||||
|
}
|
||||||
|
|
||||||
|
# # A list of fixed users
|
||||||
|
# fixed_users {
|
||||||
|
# enabled: true
|
||||||
|
# users: [
|
||||||
|
# {
|
||||||
|
# username: "john"
|
||||||
|
# password: "123456"
|
||||||
|
# name: "john doe"
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# ]
|
||||||
|
# }
|
||||||
}
|
}
|
||||||
|
|
||||||
cors {
|
cors {
|
||||||
|
@ -63,7 +63,7 @@ def before_request():
|
|||||||
|
|
||||||
if call.result.cookies:
|
if call.result.cookies:
|
||||||
for key, value in call.result.cookies.items():
|
for key, value in call.result.cookies.items():
|
||||||
response.set_cookie(key, value, httponly=True)
|
response.set_cookie(key, value, **config.get("apiserver.auth.cookies"))
|
||||||
|
|
||||||
return response
|
return response
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
Loading…
Reference in New Issue
Block a user