my-cloud-devops-consulting 1.1.202507211609__py3-none-any.whl → 1.1.202507211722__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app.py +20 -13
- {my_cloud_devops_consulting-1.1.202507211609.dist-info → my_cloud_devops_consulting-1.1.202507211722.dist-info}/METADATA +1 -1
- my_cloud_devops_consulting-1.1.202507211722.dist-info/RECORD +5 -0
- my_cloud_devops_consulting-1.1.202507211609.dist-info/RECORD +0 -5
- {my_cloud_devops_consulting-1.1.202507211609.dist-info → my_cloud_devops_consulting-1.1.202507211722.dist-info}/WHEEL +0 -0
- {my_cloud_devops_consulting-1.1.202507211609.dist-info → my_cloud_devops_consulting-1.1.202507211722.dist-info}/top_level.txt +0 -0
app.py
CHANGED
@@ -13,8 +13,6 @@ from werkzeug.middleware.proxy_fix import ProxyFix
|
|
13
13
|
|
14
14
|
app = Flask(__name__)
|
15
15
|
app.secret_key = SECRET_KEY # Secure your secret key with an environment variable
|
16
|
-
# 🔐 Let Flask correctly detect HTTPS and domain from proxy headers
|
17
|
-
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)
|
18
16
|
### app.secret_key = SECRET_KEY isn’t an import at all—it’s just an assignment
|
19
17
|
login_manager = LoginManager()
|
20
18
|
|
@@ -132,21 +130,16 @@ def contact_form():
|
|
132
130
|
return render_template('contact-form.html')
|
133
131
|
|
134
132
|
# Update the /videos route to support both login types if does not work use this old one
|
135
|
-
# @app.route('/videos')
|
136
|
-
# # @login_required
|
137
|
-
# def private_videos():
|
138
|
-
# if not current_user.is_authenticated:
|
139
|
-
# return redirect(url_for('login'))
|
140
|
-
# videos = get_videos()
|
141
|
-
# return render_template('private-videos.html', videos=videos)
|
142
|
-
|
143
133
|
@app.route('/videos')
|
134
|
+
# @login_required
|
144
135
|
def private_videos():
|
145
|
-
if not current_user.is_authenticated
|
136
|
+
if not current_user.is_authenticated:
|
146
137
|
return redirect(url_for('login'))
|
147
138
|
videos = get_videos()
|
148
139
|
return render_template('private-videos.html', videos=videos)
|
149
140
|
|
141
|
+
|
142
|
+
|
150
143
|
@app.route("/logout")
|
151
144
|
@login_required
|
152
145
|
def logout():
|
@@ -309,10 +302,24 @@ def authorize():
|
|
309
302
|
|
310
303
|
|
311
304
|
# Configure a logout route that erases user session data.
|
305
|
+
# @app.route('/logout/cognito')
|
306
|
+
# def logout_cognito(): # ✅ Renamed to avoid conflict
|
307
|
+
# session.pop('user', None)
|
308
|
+
# return redirect(url_for('home')) # 🔁 Also change to 'home' if 'index' doesn't exist
|
309
|
+
|
312
310
|
@app.route('/logout/cognito')
|
313
|
-
def logout_cognito():
|
311
|
+
def logout_cognito():
|
314
312
|
session.pop('user', None)
|
315
|
-
|
313
|
+
|
314
|
+
cognito_domain = 'https://us-east-1tzvykdvvg.auth.us-east-1.amazoncognito.com'
|
315
|
+
client_id = '1lc7qso1g3lr9kqbr0nb0jktbs' # Make sure this matches your App Client ID
|
316
|
+
logout_redirect_uri = url_for('home', _external=True)
|
317
|
+
|
318
|
+
return redirect(
|
319
|
+
f"{cognito_domain}/logout?client_id={client_id}&logout_uri={logout_redirect_uri}"
|
320
|
+
)
|
321
|
+
|
322
|
+
|
316
323
|
|
317
324
|
|
318
325
|
|
@@ -0,0 +1,5 @@
|
|
1
|
+
app.py,sha256=JhYl1My8hHBBqNLDarRAyNdJ6iHjya0b8grK4pZkU9U,11290
|
2
|
+
my_cloud_devops_consulting-1.1.202507211722.dist-info/METADATA,sha256=_ZNI-1aHIjMHa7Zj6b6q32PZUpBk59vemmSpN1lZ-RE,785
|
3
|
+
my_cloud_devops_consulting-1.1.202507211722.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4
|
+
my_cloud_devops_consulting-1.1.202507211722.dist-info/top_level.txt,sha256=io9g7LCbfmTG1SFKgEOGXmCFB9uMP2H5lerm0HiHWQE,4
|
5
|
+
my_cloud_devops_consulting-1.1.202507211722.dist-info/RECORD,,
|
@@ -1,5 +0,0 @@
|
|
1
|
-
app.py,sha256=STrknza7ZbJMynowuRGtvxcHrLWZLC3fzLcQUyvGb2g,11234
|
2
|
-
my_cloud_devops_consulting-1.1.202507211609.dist-info/METADATA,sha256=Y4jYh3nCeLIZwdkTrIApzkfwZQl01R1Im7kypFe_rcM,785
|
3
|
-
my_cloud_devops_consulting-1.1.202507211609.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4
|
-
my_cloud_devops_consulting-1.1.202507211609.dist-info/top_level.txt,sha256=io9g7LCbfmTG1SFKgEOGXmCFB9uMP2H5lerm0HiHWQE,4
|
5
|
-
my_cloud_devops_consulting-1.1.202507211609.dist-info/RECORD,,
|
File without changes
|