Summary: | Shorter JS and CSS rewrite rule | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Architecture, internals, and plumbing | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | charles.farmer, jonathan.druart, josef.moravec, martin.renvoize, nick, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20187 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 20187 | ||
Bug Blocks: | |||
Attachments: |
Bug 20259: Shorter JS and CSS rewrite rule
Bug 20259: Shorter JS and CSS rewrite rule Bug 20259: Shorter JS and CSS rewrite rule |
Description
Fridolin Somers
2018-02-21 10:06:04 UTC
Created attachment 72014 [details] [review] Bug 20259: Shorter JS and CSS rewrite rule Bug 20187 has changed the JS and CSS rewrite rules to : RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L] RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L] This patch changes this rules using [0-9]{N} and fusion in one rule. And espaces the dot in extension js and css. Test plan : 1) Go to intranet and opac 2) Check CSS and JS are doing well 3) Apply patch changes on our Apache configuration 4) Reload intranet and opac pages (Ctrl + F5) 5) Check CSS and JS are doing well Hum, I tried that and it did not work. Will try again later. It works for me. (Apache was restarted, double checked that) Also tried the test plan from https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20187#c8 And checked the login pages. Tested with Apache 2.4.18 on Ubuntu 16.04 Only seeing 200's on my station. Looks good. Tested with: Server version: Apache/2.4.18 (Ubuntu) Server built: 2018-04-18T14:53:04 Created attachment 76111 [details] [review] Bug 20259: Shorter JS and CSS rewrite rule Bug 20187 has changed the JS and CSS rewrite rules to : RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L] RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L] This patch changes this rules using [0-9]{N} and fusion in one rule. And espaces the dot in extension js and css. Test plan : 1) Go to intranet and opac 2) Check CSS and JS are doing well 3) Apply patch changes on our Apache configuration 4) Reload intranet and opac pages (Ctrl + F5) 5) Check CSS and JS are doing well Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Created attachment 76147 [details] [review] Bug 20259: Shorter JS and CSS rewrite rule Bug 20187 has changed the JS and CSS rewrite rules to : RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L] RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L] This patch changes this rules using [0-9]{N} and fusion in one rule. And espaces the dot in extension js and css. Test plan : 1) Go to intranet and opac 2) Check CSS and JS are doing well 3) Apply patch changes on our Apache configuration 4) Reload intranet and opac pages (Ctrl + F5) 5) Check CSS and JS are doing well Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Awesome work all! Pushed to master for 18.11.x If I understand correctly: The good thing is that people can keep the old rule without issue so they won't have to change the RewriteRules for 18.05 and 18.11 (In reply to Victor Grousset/tuxayo from comment #8) > If I understand correctly: The good thing is that people can keep the old > rule without issue so they won't have to change the RewriteRules for 18.05 > and 18.11 Yes, they are similar but one is easier to read. I'm not going to backport this to 18.05.x, save surprising users having to intervene during package upgrades, especially as the rule change is a cosmetic one for server administrators only. (In reply to Martin Renvoize from comment #10) > I'm not going to backport this to 18.05.x, save surprising users having to > intervene during package upgrades, especially as the rule change is a > cosmetic one for server administrators only. Indeed, server administrators love makeup ;) |