[FEATURE] Write static headers to to the server config file#6
[FEATURE] Write static headers to to the server config file#6
Conversation
PLG_SYSTEM_HTTPHEADER_WRITE_STATIC_HEADERS="Write headers to the configuration file"
PLG_SYSTEM_HTTPHEADER_WRITE_STATIC_HEADERS_DESC="When enabled the headers (excluding the Content-Security-Policy) will be added to the existing server configuration file as soon as you save this extension. This way the headers will be enforced from the server side. At this time we only support .htaccess (Apache) and web.config (IIS) files."
PLG_SYSTEM_HTTPHEADER_MESSAGE_STATICHEADERS_NOT_WRITTEN_NO_SERVER_CONFIGFILE_FOUND="We couldn't find any active .htaccess or web.config file to apply the rules to. Please first rename the htaccess.txt to .htaccess or web.config.txt to web.config and make sure the configuration files works."
PLG_SYSTEM_HTTPHEADER_MESSAGE_STATICHEADERS_WRITTEN="All static headers have been written to the server configuration file."
PLG_SYSTEM_HTTPHEADER_MESSAGE_STATICHEADERS_NOT_WRITTEN="Your %1$s file is not writable or there was a problem creating the file. You will have to upload the following code by hand. Select the following code and then paste into a new text file. Name this file '%1$s' and upload it to your site root folder.<br><pre>%2$s</pre>" |
|
Thanks @brianteeman I have just updated the branch and the PR description. Thanks. |
|
Thanks I will only apply alpha ordering of the strings when i get back on the code, hopefully tomorrow :-) |
|
Thanks @brianteeman for the language suggestions. I have just pushed them as a single commit your suggestions are very much appreciated. 👍 |
* Typos corrected - Wikipedia links edited * New strings added * Update fr-FR.plg_system_httpheader.ini * Update fr-FR.plg_system_httpheader.sys.ini * Typo corrected
* Italian language file Italian language for the plugin. * Update it-IT.plg_system_httpheader.sys.ini Updated language file to match the new branch * Rename it-IT.plg_system_httpheader.sys.ini to it-IT.plg_system_httpheader.ini * Create it-IT.plg_system_httpheader.sys.ini
|
Ok merging this now. Thanks all for your help and feedback on this one As soon as the com_csp PR (joomla/joomla-cms#24365) is merged I can start preparing to move this to 4.0 too as the config is moved there and I don't want to run into conflicts where i miss to change an config string ;) |
|
Just released 1.0.6: https://github.com/zero-24/plg_system_httpheader/releases/tag/1.0.6 🎉 |
Hi,
this is the code for the next feature update of the plugin adding support to write the static headers to the .htaccess and web.config files without interaction of the user as well as updating the values when already set when the user saves the extension from the backend.
New Language strings
Here are the new language strings shipped with this feature please let me know whether any of this is unknown or can be improved. When you get the time please send the new translated strings to this branch here: https://github.com/zero-24/plg_system_httpheader/tree/saveToServerConfigFile or post them here as comment and i can commit them on your behalf.
Please let me know when you have any questions or remarks on the strings.
cc @pe7er (ne-NL) @YGomiero (fr-FR) @brianteeman (en-GB)
How to test
Install this package representing the latest development version and report any issues remarks here:
plg_system_httpheader.zip
I would like to ask @SniperSister and @yvesh to take a look from the PHP side and give this an review, but also any other kind of feedback is appreciated :)
Additional note
When ready the plan is this to be merged up to the version of this plugin shipped with Joomla 4.0 too.
Thanks for your support 👍