Should "Forward Query Strings" CloudFront setting be enabled for Discourse?

(Aahan Krish) #1

CloudFront has this option in distribution settings:

Select whether you want CloudFront to include query strings in the request URLs that it forwards to your origin. If you return different versions of an object based on the query string, select Yes. Otherwise, select No. For more information, see the Help.

From view-source I noticed that Discourse does use query strings for some static content, but I am not sure if these query strings are page/user specific or used only for cache purging. If it’s the latter (i.e. cache purging) then it’d be safe to enable the setting in CloudFront.

So, the question is, what should the CloudFront setting be for Discourse?

(Aahan Krish) #2

@sam You have a comprehensive idea of how Discourse works, so what should the option be set to?

(Kane York) #3

Discourse doesn’t use very many query strings, but those that it does are things like mobile_view and preview_style. So, I’d say that it’s safer to forward them - there aren’t all that many anyways.