Skip to content

Commit

Permalink
Merge branch 'apache:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
subkanthi authored Jan 23, 2022
2 parents cf2376f + c5ffe0c commit 8880c75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions airflow/providers/amazon/aws/hooks/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ def get_log_events(
| 'ingestionTime' (int): The time in milliseconds the event was ingested.
"""
next_token = None

event_count = 1
while event_count > 0:
while True:
if next_token is not None:
token_arg: Optional[Dict[str, str]] = {'nextToken': next_token}
else:
Expand All @@ -94,7 +92,7 @@ def get_log_events(

yield from events

if 'nextForwardToken' in response:
if next_token != response['nextForwardToken']:
next_token = response['nextForwardToken']
else:
return
3 changes: 2 additions & 1 deletion airflow/www/extensions/init_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def init_xframe_protection(app):
return

def apply_caching(response):
response.headers["X-Frame-Options"] = "DENY"
if not x_frame_enabled:
response.headers["X-Frame-Options"] = "DENY"
return response

app.after_request(apply_caching)
Expand Down

0 comments on commit 8880c75

Please sign in to comment.