Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SITES-5185 - Ensure all GraphQL Queries to publisher are using Persistent Queries and not POST requests #341

Merged
merged 5 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dispatcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</requireFileChecksum>
<requireFileChecksum>
<file>src/conf.d/dispatcher_vhost.conf</file>
<checksum>81cce48a27703d0cdc3c1d7d61efc10b</checksum>
<checksum>12dd5e3f5f4c6a02f28d72561799879e</checksum>
<type>md5</type>
<message>There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.d/dispatcher_vhost.conf</message>
</requireFileChecksum>
Expand Down
10 changes: 10 additions & 0 deletions dispatcher/src/conf.d/dispatcher_vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
</LocationMatch>
</IfDefine>

# SITES-5185 - Ensure all GraphQL Queries to production publisher are using Persistent Queries and not direct query requests
<IfDefine ENVIRONMENT_PROD>
SSLProxyEngine on
<LocationMatch "^/content/_cq_graphql/.*/endpoint.json$">
RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^$ [OR]
RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^false$
RewriteRule ^/(.*)$ - [R=404,L]
</LocationMatch>
</IfDefine>

# If the module loads correctly then apply base settings for the module
<IfModule disp_apache2.c>
# location of the configuration file. eg: 'conf/dispatcher.any'
Expand Down