diff --git a/src/docker-compose.yml b/src/docker-compose.yml index d104a4c15..50c29802b 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -26,7 +26,7 @@ services: # Run Django in debug mode on local - DJANGO_DEBUG=True # Tell Django where it is being hosted - - DJANGO_BASE_URL="localhost:8080" + - DJANGO_BASE_URL=http://localhost:8080 # --- These keys are obtained from `.env` file --- # Set a private JWT signing key for Login.gov - DJANGO_SECRET_LOGIN_KEY diff --git a/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss b/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss index aab929a51..c176ed937 100644 --- a/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss +++ b/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss @@ -22,8 +22,7 @@ i.e. @use "uswds-core" as *; -// Test custom style -p { - color: color('blue-10v'); -} - +// Test custom style (except this has not enough contrast) +//p { +// color: color('blue-10v'); +//} diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py index 93293073c..cda2f14bc 100644 --- a/src/registrar/config/settings.py +++ b/src/registrar/config/settings.py @@ -164,6 +164,7 @@ TEMPLATES = [ "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", "registrar.context_processors.language_code", + "registrar.context_processors.canonical_path", ], }, }, @@ -379,7 +380,7 @@ AUTHENTICATION_BACKENDS = [ # this is where unauthenticated requests are redirected when using # the login_required() decorator, LoginRequiredMixin, or AccessMixin -LOGIN_URL = "openid/openid/login" +LOGIN_URL = "openid/login" # where to go after logging out LOGOUT_REDIRECT_URL = "home" @@ -405,10 +406,8 @@ OIDC_PROVIDERS = { }, "client_registration": { "client_id": "cisa_dotgov_registrar", - "redirect_uris": [f"https://{env_base_url}/openid/callback/login/"], - "post_logout_redirect_uris": [ - f"https://{env_base_url}/openid/callback/logout/" - ], + "redirect_uris": [f"{env_base_url}/openid/callback/login/"], + "post_logout_redirect_uris": [f"{env_base_url}/openid/callback/logout/"], "token_endpoint_auth_method": ["private_key_jwt"], "sp_private_key": secret_login_key, }, diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py index 699575f5d..0a9ff6da9 100644 --- a/src/registrar/config/urls.py +++ b/src/registrar/config/urls.py @@ -7,10 +7,11 @@ For more information see: from django.contrib import admin from django.urls import include, path -from registrar.views import health, index, profile +from registrar.views import health, index, profile, whoami urlpatterns = [ path("", index.index, name="home"), + path("whoami", whoami.whoami, name="whoami"), path("admin/", admin.site.urls), path("health/", health.health), path("edit_profile/", profile.edit_profile, name="edit-profile"), diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 6e104b66d..38f058b93 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -11,3 +11,13 @@ def language_code(request): TEMPLATES dict of our settings file). """ return {"LANGUAGE_CODE": settings.LANGUAGE_CODE} + + +def canonical_path(request): + """Add a canonical URL to the template context. + + To make a correct "rel=canonical" link in the HTML page, we need to + construct an absolute URL for the page, and we can't do that in the + template itself, so we do it here and pass the information on. + """ + return {"CANONICAL_PATH": request.build_absolute_uri(request.path)} diff --git a/src/registrar/templates/base.html b/src/registrar/templates/base.html index 3c303013d..679fe527f 100644 --- a/src/registrar/templates/base.html +++ b/src/registrar/templates/base.html @@ -7,28 +7,26 @@