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

wrong header set when loading pre compressed js or css files #384

Open
Orgoth opened this issue Mar 25, 2024 · 2 comments
Open

wrong header set when loading pre compressed js or css files #384

Orgoth opened this issue Mar 25, 2024 · 2 comments

Comments

@Orgoth
Copy link

Orgoth commented Mar 25, 2024

Joomla 5 delivers already compressed files, but openlitespeed does not set the headers as it should be.

Selection_003

/public_html/media/plg_system_guidedtours/js/guidedtours.min.js.gz
/public_html/media/plg_system_guidedtours/js/guidedtours.min.js

Openlitespeed reads the .gz and delivers the content without the needed header "Content-Encoding: gzip"
Changing the tuning settings does not help in any way.

@Orgoth
Copy link
Author

Orgoth commented Mar 26, 2024

joomla/joomla-cms#38028
OpenLiteSpeed ignores the restriction and parses the rewrite rules within and leads to broken Joomla-Backends.
https://github.com/joomla/joomla-cms/blob/4.4-dev/htaccess.txt#L139

@Orgoth
Copy link
Author

Orgoth commented Oct 15, 2024

The Google Group is also dead in the water, the developers don't care at all.

Swiched back to nginx and apache, since the developers are completely unable to fix such a simple problem.

Simply ignore all ifmodule blocks which are not rewrite to prevent breaking applications like joomla.

  • The hole block including rules within the block.
    I do not see the problem. -_-

Example:

<IfModule mod_headers.c>
	# Serve gzip compressed CSS files if they exist
	# and the client accepts gzip.
	RewriteCond "%{HTTP:Accept-encoding}" "gzip"
	RewriteCond "%{REQUEST_FILENAME}\.gz" -s
	RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]

	# Serve gzip compressed JS files if they exist
	# and the client accepts gzip.
	RewriteCond "%{HTTP:Accept-encoding}" "gzip"
	RewriteCond "%{REQUEST_FILENAME}\.gz" -s
	RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]

	# Serve correct content types, and prevent mod_deflate double compression.
	RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1]
	RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]

	<FilesMatch "(\.js\.gz|\.css\.gz)$">
		# Serve correct encoding type.
		Header set Content-Encoding gzip

		# Force proxies to cache gzipped &
		# non-gzipped css/js files separately.
		Header append Vary Accept-Encoding
	</FilesMatch>
</IfModule>

At the moment we are recommending all customers to not use openlitespeed at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant