set cookie from helloworld app
@@ -20,7 +20,9 @@ app = Flask(__name__)
def hello():
service_version = os.environ.get('A8_SERVICE').split(':')
version = service_version[1] if len(service_version) == 2 else 'UNVERSIONED'
- return 'Hello version: %s, container: %s\n' % (version, os.environ.get('HOSTNAME'))
+ response = app.make_response('Hello version: %s, container: %s\n' % (version, os.environ.get('HOSTNAME')))
+ response.set_cookie('version', service_version)
+ return response
@app.route('/health')
def health():
