Ghost/ghost
Kevin Ansfield ef143978e7
🎨 Reduced requests and 403 responses for comments auth check (#19840)
closes https://linear.app/tryghost/issue/ENG-721
ref https://linear.app/tryghost/issue/ENG-708

Comments-UI loads `/ghost/admin-frame/` in an iframe to check if a Staff User is authenticated in order to  show moderation options. That iframe request loads a HTML page which in turn contains a script that fires off an API request that attempts to fetch the logged-in user details, resulting in a 403 "error" showing up when not authenticated. In the vast majority of cases there will be no staff user authenticated so lots of extra requests and "errors" are seen unnecessarily.

- adjusted the `/ghost/auth-frame/` endpoint to check if the request contains an Admin session cookie
  - if it does, continue as before with rendering the HTML page so the script is loaded
  - if it doesn't, return an empty 204 response avoiding the script request and subsequent 403-generating API request
- eliminates the 403 error being generated for all typical visitor traffic, the error should only be seen when an Admin was previously logged in but their cookie is no longer valid (either from logging out, or going past the 6month validity period)
2024-03-12 12:27:18 +00:00
..
adapter-cache-memory-ttl Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
adapter-cache-redis Implemented Refresh-Ahead caching for Redis 2024-01-18 20:16:36 +07:00
adapter-manager Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
admin Fixed scrolling issues on members table (#19833) 2024-03-11 17:32:10 +01:00
announcement-bar-settings Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
api-framework Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
api-version-compatibility-service Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
audience-feedback Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
bookshelf-repository Removed usage of yg when using NQL (#19287) 2024-01-15 14:40:01 +00:00
bootstrap-socket Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
collections Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
constants Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
core 🎨 Reduced requests and 403 responses for comments auth check (#19840) 2024-03-12 12:27:18 +00:00
custom-theme-settings-service Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
data-generator Added re-enable of innodb redo log once DataImporter has run (#19678) 2024-02-08 16:02:01 +00:00
domain-events Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
donations Update dependency typescript to v5.4.2 2024-03-11 17:16:17 +01:00
dynamic-routing-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-addresses Update dependency typescript to v5.4.2 2024-03-11 17:16:17 +01:00
email-analytics-provider-mailgun Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-analytics-service Update TryGhost packages 2023-10-31 20:54:17 +01:00
email-content-generator Update dependency fs-extra to v11.2.0 2023-11-28 11:54:44 +01:00
email-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-service Update dependency html-validate to v8.15.0 2024-03-12 06:26:02 +01:00
email-suppression-list Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
express-dynamic-redirects Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
external-media-inliner Add Lexical support to the external-media-inliner (#19149) 2023-11-29 17:56:03 +00:00
extract-api-key Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
html-to-plaintext Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
i18n Edited few phrases in Slovak (sk) translation to make it sound better (#19825) 2024-03-11 17:56:26 -04:00
importer-handler-content-files Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
importer-revue 🐛 Fixed rare rendering issue of lists appearing as headings (#19511) 2024-01-22 09:43:05 +01:00
in-memory-repository Added tests to AdminX framework package (#19022) 2023-11-20 11:00:51 +00:00
job-manager Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
link-redirects Update Types packages 2023-11-08 12:13:12 +01:00
link-replacer 🐛 Fixed unexpected conversion of single-quoted attributes in HTML cards (#19727) 2024-03-06 09:11:49 +00:00
link-tracking Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
magic-link Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
mail-events Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
mailgun-client Update dependency mailgun.js to v9.4.1 2024-01-04 17:53:34 +00:00
member-attribution 🐛 Fixed unexpected conversion of single-quoted attributes in HTML cards (#19727) 2024-03-06 09:11:49 +00:00
member-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
members-api Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
members-csv 🐛 Fixed members import unsubscribing members when subscribe_to_emails is empty (#19658) 2024-02-06 10:19:16 -08:00
members-events-service Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
members-importer Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
members-ssr Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
mentions-email-report Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
milestones Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
minifier Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
model-to-domain-event-interceptor Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-api-version-mismatch Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
mw-cache-control Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-error-handler Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
mw-session-from-token Update dependency express to v4.18.3 2024-03-07 13:42:27 +01:00
mw-update-user-last-seen Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-version-match Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
mw-vhost Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
nql-filter-expansions Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
oembed-service 🐛 Fixed HTTP 500 responses when oembed endpoint receives error 2024-03-12 12:31:44 +01:00
offers Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
package-json Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
payments Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
post-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
post-revisions Added tests to AdminX framework package (#19022) 2023-11-20 11:00:51 +00:00
posts-service Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
recommendations 🐛 Fixed returning HTTP 500 response when recommendations check fails 2024-03-12 12:31:44 +01:00
referrers Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
security Update TryGhost packages 2023-10-31 20:54:17 +01:00
session-service Update dependency express to v4.18.3 2024-03-07 13:42:27 +01:00
settings-path-manager Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
slack-notifications Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
staff-service Added email address alignment protections (#19094) 2023-11-23 10:25:30 +01:00
stats-service Update Types packages 2024-01-15 21:04:04 +01:00
stripe Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
tiers Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
update-check-service Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
verification-trigger Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
version-notifications-data-service Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
webmentions Updated @tryghost/errors dependency 2024-03-11 17:33:51 +01:00
tsconfig.json Disabled TypeScript incremental building 2023-08-09 18:27:56 +02:00