Edit /opt/ftrack/nginx/conf/nginx_https.conf or /opt/ftrack/nginx/conf/nginx_http.conf
Find log_format configuration, and comment out the lines. Add the configuration from this snippet.
Reload the Configuration; /opt/ftrack/nginx/sbin/nginx -s reload
Use the method in set_session_client_token.py to set the client token for the Python API. For any integration using the JS API, you can pass in clientToken option when creating the session.
defpatch_request_add_client_token(original,client_token):defadd_request_headers(self,*args,**kwargs):kwargs['headers'].update({'ftrack-clientToken':client_token})returnoriginal(self,*args,**kwargs)returnadd_request_headersdefset_session_client_token(session,client_id):importuuidcustom_client_token='{}--{}'.format(client_id,uuid.uuid4())session._request.post=patch_request_add_client_token(session._request.post,custom_client_token)# Configure *session* to send a ClientToken begining with "company-tool-foo"set_session_client_token(session,'company-tool-foo')
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.