Fix broken redirect (#467)
By default, flask turns redirects into absolute URLs. This is undesired behaviour on Kubernetes, because the Pod's own IP address is not really useful to any client that's not in the cluster (and even within the cluster most clients will want to use the address of a Service, not a Pod).
This commit is contained in:
@@ -13,4 +13,6 @@ def main():
|
||||
# back to the list
|
||||
item = request.form['text']
|
||||
redisConnection.rpush('guestbook', item)
|
||||
return redirect('/guestbook', code=303)
|
||||
r = redirect('/guestbook', code=303)
|
||||
r.autocorrect_location_header = False
|
||||
return r
|
||||
|
||||
Reference in New Issue
Block a user