From 571360a8304e27f90d716404b7bf3916df08b14a Mon Sep 17 00:00:00 2001 From: "Noah Hanford (spaced)" Date: Sat, 11 Apr 2026 00:00:10 -0400 Subject: [PATCH 1/2] try and fix cache 2 --- Dockerfile | 2 +- profiles/__init__.py | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 87141ed..135bfca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,4 @@ COPY . /opt/profiles RUN git config --system --add safe.directory '*' # This is also some OKD shit. -ENTRYPOINT ["ddtrace-run", "gunicorn", "profiles:app", "--bind=0.0.0.0:8080", "--access-logfile=-", "--timeout=600"] +ENTRYPOINT ["gunicorn", "profiles:app", "--bind=0.0.0.0:8080", "--access-logfile=-", "--timeout=600"] diff --git a/profiles/__init__.py b/profiles/__init__.py index c2c6ddd..373228a 100644 --- a/profiles/__init__.py +++ b/profiles/__init__.py @@ -8,11 +8,9 @@ from flask import Flask, flash, jsonify, redirect, render_template, request from flask_pyoidc.flask_pyoidc import OIDCAuthentication from flask_pyoidc.provider_configuration import ProviderConfiguration, ClientMetadata -from flask_sqlalchemy import SQLAlchemy from flask_uploads import IMAGES, UploadSet, configure_uploads from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration -from sqlalchemy.exc import SQLAlchemyError app = Flask(__name__) @@ -64,10 +62,7 @@ ldap_get_group_desc, ldap_get_groups, ldap_get_intro_members, - ldap_get_member, ldap_get_onfloor_members, - ldap_get_year, - ldap_is_active, ldap_is_rtp, ldap_search_members, ldap_update_profile, @@ -81,8 +76,7 @@ @app.after_request def set_cache_headers(response): if "Cache-Control" not in response.headers: - response.headers["Cache-Control"] = "no-store" - response.headers["Vary"] = "Cookie" + response.headers["Cache-Control"] = "no-store, no-cache, must-revalidate" return response From 8212ba1bb440050e09c8c6e27f0463892d7aab7b Mon Sep 17 00:00:00 2001 From: "Noah Hanford (spaced)" Date: Sat, 11 Apr 2026 00:05:45 -0400 Subject: [PATCH 2/2] maybe fixed it --- profiles/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/profiles/__init__.py b/profiles/__init__.py index 373228a..f799316 100644 --- a/profiles/__init__.py +++ b/profiles/__init__.py @@ -63,6 +63,7 @@ ldap_get_groups, ldap_get_intro_members, ldap_get_onfloor_members, + ldap_get_year, ldap_is_rtp, ldap_search_members, ldap_update_profile,