├── CHANGELOG.md ├── assets ├── lupe.gif ├── refresh.gif ├── reset.gif ├── indicator.gif ├── sortierung.gif ├── style-darkmode.css └── style.css ├── uninstall.php ├── README.md ├── package.yml ├── LICENSE ├── lang ├── en_gb.lang ├── dk_dk.lang ├── nl_nl.lang └── de_de.lang ├── install.php ├── functions └── functions.inc.php ├── pages ├── help.inc.php ├── index.php └── default.inc.php └── boot.php /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FriendsOfREDAXO/httpheader/main/CHANGELOG.md -------------------------------------------------------------------------------- /assets/lupe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FriendsOfREDAXO/httpheader/main/assets/lupe.gif -------------------------------------------------------------------------------- /assets/refresh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FriendsOfREDAXO/httpheader/main/assets/refresh.gif -------------------------------------------------------------------------------- /assets/reset.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FriendsOfREDAXO/httpheader/main/assets/reset.gif -------------------------------------------------------------------------------- /assets/indicator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FriendsOfREDAXO/httpheader/main/assets/indicator.gif -------------------------------------------------------------------------------- /assets/sortierung.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FriendsOfREDAXO/httpheader/main/assets/sortierung.gif -------------------------------------------------------------------------------- /uninstall.php: -------------------------------------------------------------------------------- 1 | getProperty('package'); 12 | $error = ""; $notice = ""; 13 | 14 | 15 | //Datenbank-Einträge löschen 16 | 17 | 18 | //Module löschen 19 | 20 | 21 | //Aktionen löschen 22 | 23 | 24 | //Templates löschen 25 | ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | HTTP-Header 2 | =========== 3 | 4 | Aktivierung verschiedener Webseiten-Header zur Einstellung von Sicherheitsmaßnahmen und Optimierungen. 5 | 6 | Zu beachten ist, dass nicht alle Header von allen Browsern berücksichtigt werden und dass der verwendete Webserver die jeweilige Aktivierung unterstützen muss. 7 | 8 | 9 | Einstellbare Header 10 | ------------------- 11 | - Connection: keep-alive 12 | - Vary: Accept-Encoding 13 | - Unterdrückung der Serverkennung 14 | - Unterdrückung der Kennung X-Powered-By 15 | - X-Content-Type-Options: nosniff 16 | - X-Frame-Options 17 | - X-XSS-Protection 18 | - Referrer-Policy 19 | - Strict-Transport-Security 20 | - Content-Security-Policy 21 | - Feature-/Permissions-Policy 22 | 23 | ----- 24 | 25 | ### Changelog 26 | siehe CHANGELOG.md des AddOns -------------------------------------------------------------------------------- /package.yml: -------------------------------------------------------------------------------- 1 | # Alle hier gesetzten Werte können über $addon->getProperty($key) abgefragt werden 2 | 3 | package: httpheader #Pflichtfeld 4 | version: '1.1.3' #Pflichtfeld 5 | author: Friends Of REDAXO 6 | supportpage: https://github.com/FriendsOfREDAXO/httpheader 7 | 8 | page: 9 | title: 'translate:a1656_title' #Werte die mit "translate:" beginnen kommen aus der Sprachdatei. 10 | perm: httpheader[] 11 | icon: rex-icon fa-exclamation-triangle 12 | subpages: 13 | default: { title: 'translate:a1656_default' } 14 | help: { title: 'translate:a1656_help', icon: rex-icon fa-info-circle, itemclass: pull-right } 15 | 16 | requires: 17 | redaxo: '^5.10.0' #benötigt mindestens REDAXO 5.10 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Friends Of REDAXO 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/style-darkmode.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document for HTTP-Header - DarkMode */ 3 | /* v1.1 */ 4 | 5 | 6 | @media (prefers-color-scheme: dark){ 7 | 8 | body:not(.rex-theme-light) .boxed-group { background: #242f3c; } 9 | 10 | body:not(.rex-theme-light) .hh-modal .modal-header { background: inherit; } 11 | 12 | body:not(.rex-theme-light) .checkbox.toggle label input, 13 | body:not(.rex-theme-light) .radio.toggle label input 14 | { background: #202b35; } 15 | body:not(.rex-theme-light) .checkbox.toggle label input::after, 16 | body:not(.rex-theme-light) .radio.toggle label input::after, 17 | body:not(.rex-theme-light) .radio.switch label input::before 18 | { background: #CCC; } 19 | 20 | body:not(.rex-theme-light) .checkbox.toggle label input:checked, 21 | body:not(.rex-theme-light) .radio.toggle label input:checked 22 | { background: #409be4; } 23 | body:not(.rex-theme-light) .checkbox.toggle label input:checked::after, 24 | body:not(.rex-theme-light) .radio.toggle label input:checked::after, 25 | body:not(.rex-theme-light) .radio.switch label input:checked::before 26 | { background: #EEE; } 27 | 28 | } -------------------------------------------------------------------------------- /assets/style.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document for HTTP-Header */ 3 | /* v1.0 */ 4 | 5 | .boxed-group { position: relative; background: rgba(255,255,255, 0.6); margin: 0px 0px 15px; padding: 15px 20px; border: #CCC; } 6 | .boxed-group dl.form-group { margin-bottom: 0px; margin-top: 15px; } 7 | .boxed-group dl.form-group:first-child { margin-top: 0px; } 8 | .boxed-group .hiddencontent > dl:first-child { margin-top: 15px; } 9 | 10 | .boxed-group label.nobold { font-weight: normal; } 11 | 12 | .cspblock { display: inline-block; vertical-align: top; min-width: 182px; margin: 0px 23px 18px 0px; padding: 7px 14px; transition: all .3s ease; } 13 | .cspblock:hover { background: #FFF; } 14 | .cspblock label { margin-right: 0px !important; } 15 | .cspblock ul { list-style: none; margin: 0px; padding: 0px;} 16 | .cspblock li { margin: 0px 0px 5px; } 17 | 18 | 19 | /* Header-Farben */ 20 | .hh-risk { border-left: 3px solid orange; } 21 | .hh-highrisk { border-left: 3px solid #D9534F; } 22 | 23 | /* Checkbox-Toggler */ 24 | label input[type=checkbox].toggle { -webkit-appearance: none; -moz-appearance: none; appearance: none; width: 3em; height: 1.5em; background: #ddd; vertical-align: middle; border-radius: 1.6em; position: relative; outline: 0; margin-top: -3px; margin-right: 10px; cursor: pointer; -webkit-transition: background 0.1s ease-in-out; transition: background 0.1s ease-in-out; } 25 | label input[type=checkbox].toggle::after { content: ''; width: 1.5em; height: 1.5em; background: white; position: absolute; border-radius: 1.2em; -webkit-transform: scale(0.7); transform: scale(0.7); left: 0; box-shadow: 0 1px rgba(0, 0, 0, 0.5); -webkit-transition: left 0.1s ease-in-out; transition: left 0.1s ease-in-out; } 26 | label input[type=checkbox].toggle:checked { background: #5791CE; } 27 | label input[type=checkbox].toggle:checked::after { left: 1.5em; } 28 | 29 | /* Checkbox-Toggler small */ 30 | .includebackend { text-align: right; zoom: 0.75; margin: 0px; position: absolute; top: 13px; right: 13px; } 31 | .includebackend label { margin-right: 0px !important; } 32 | .includebackend label input[type=checkbox].toggle { margin-right: 8px; } 33 | 34 | 35 | /* Modalfenster */ 36 | .hh-modal { background: rgba(40,53,66, 0.4); } 37 | .hh-modal .modal-header { background: #dfe3e9; line-height: 1.25; padding: 10px 15px; font-size: 16px; } 38 | .hh-modal .modal-title { display: inline; } 39 | .hh-content { display: none; } 40 | 41 | 42 | @media (min-width: 768px){ 43 | .hh-modal-large .modal-dialog { width: 90%; max-width: 800px;} 44 | } -------------------------------------------------------------------------------- /lang/en_gb.lang: -------------------------------------------------------------------------------- 1 | # addon: httpheader en_gb 1.0 2 | 3 | a1656_title = HTTP header 4 | 5 | a1656_default = Settings 6 | a1656_help = Help 7 | 8 | a1656_head_basics = Settings 9 | a1656_head_help = Online help 10 | 11 | 12 | a1656_subheader_basic1 = Various headers 13 | a1656_subheader_basic2 = Security header 14 | 15 | 16 | # Backend Output 17 | a1656_seo_modal_title = SEO CheckUp 18 | a1656_seo_modal_analyze = Analysis is loading ... 19 | a1656_seo_modal_close = Close 20 | a1656_seo_modal_error = Error 21 | a1656_seo_modal_legibility = Readability 22 | a1656_seo_modal_artnotfound = Article not found 23 | 24 | 25 | # Page: General = Settings 26 | a1656_bas_active = activate 27 | a1656_bas_remove = suppress 28 | a1656_bas_includebackend = Including backend 29 | a1656_bas_property = property 30 | 31 | a1656_bas_h_connection = Connection: keep-alive 32 | a1656_bas_h_vary = Vary: Accept-Encoding 33 | a1656_bas_h_server = Server ID 34 | a1656_bas_h_poweredby = X-Powered-By 35 | a1656_bas_h_contenttype = X-Content-Type-Options: nosniff 36 | a1656_bas_h_frame = X frame options 37 | a1656_bas_h_xss = X-XSS protection 38 | a1656_bas_h_xss_block = Mode: Block 39 | a1656_bas_h_referer = Referrer-Policy 40 | a1656_bas_h_transport = Strict-Transport-Security 41 | a1656_bas_h_transport_maxage = Validity (sec.) 42 | a1656_bas_h_transport_subdomains = Including SubDomains 43 | a1656_bas_h_csp = Content-Security-Policy 44 | a1656_bas_h_csp_noeditor = Use input field instead of selection 45 | a1656_bas_h_csp_editor = Define properties 46 | a1656_bas_h_csp_definition = Store CSP definition 47 | a1656_bas_h_csp_definition_example = Format: Content-Security-Policy: default-src https: 'unsafe-inline'; frame-ancestors 'none'; 48 | a1656_bas_h_csp_url_example = URL: https://www.domain.de 49 | a1656_bas_h_fpp = Feature / Permissions Policy 50 | a1656_bas_h_fpp_noeditor = Use input fields instead of selection 51 | a1656_bas_h_fpp_editor = Define properties 52 | a1656_bas_h_fpp_definition_f = Store feature definition 53 | a1656_bas_h_fpp_definition_p = Store permission definition 54 | a1656_bas_h_fpp_definition_f_example = Format: Feature Policy: camera 'none'; microphone self; 55 | a1656_bas_h_fpp_definition_p_example = Format: Permissions-Policy: camera = (), microphone = (self) 56 | 57 | a1656_bas_h_csp_default = default-src 58 | a1656_bas_h_csp_img = img-src 59 | a1656_bas_h_csp_media = media-src 60 | a1656_bas_h_csp_font = font-src 61 | a1656_bas_h_csp_script = script-src 62 | a1656_bas_h_csp_style = style-src 63 | a1656_bas_h_csp_object = object-src 64 | a1656_bas_h_csp_form = form-action 65 | a1656_bas_h_csp_frame = frame-src 66 | a1656_bas_h_csp_frameanc = frame-ancestors 67 | a1656_bas_h_csp_connect = connect-src 68 | a1656_bas_h_csp_manifest = manifest-src 69 | 70 | a1656_bas_h_fpp_camera = camera 71 | a1656_bas_h_fpp_geolocation = geolocation 72 | a1656_bas_h_fpp_gyro = gyroscope 73 | a1656_bas_h_fpp_magnet = magnetometer 74 | a1656_bas_h_fpp_micro = microphone 75 | a1656_bas_h_fpp_usb = usb 76 | a1656_bas_h_fpp_docdomain = document-domain 77 | a1656_bas_h_fpp_fullscreen = fullscreen 78 | a1656_bas_h_fpp_payment = payment 79 | 80 | a1656_bas_h_editor_https = https: 81 | a1656_bas_h_editor_data = data: 82 | a1656_bas_h_editor_blob = blob: 83 | a1656_bas_h_editor_self = self 84 | a1656_bas_h_editor_inline = unsafe-inline 85 | a1656_bas_h_editor_eval = unsafe-eval 86 | a1656_bas_h_editor_hashes = unsafe-hashes 87 | a1656_bas_h_editor_none = none 88 | 89 | 90 | # Other requirements 91 | a1656_example = example 92 | a1656_examples = Examples ... 93 | a1656_overview = Overview: 94 | 95 | a1656_search_all = all 96 | a1656_search_noselection = - no selection - 97 | a1656_search_sort = View 98 | a1656_search_sort_onlyactive = only active entries (online) 99 | a1656_search_sort_onlyinactive = only deactivated entries (offline) 100 | a1656_search_keyword = Search term 101 | a1656_search_submit = search 102 | a1656_search_reset = Reset search 103 | a1656_search_notfound = No entries were found. 104 | a1656_search_more = more options 105 | a1656_search_cat = Category 106 | a1656_search_maincat = Main Category 107 | a1656_search_archive = Show archive entries only 108 | 109 | a1656_edit = change 110 | a1656_delete = delete 111 | a1656_online = online 112 | a1656_offline = offline 113 | a1656_new = add 114 | a1656_save = Save 115 | a1656_yes = yes 116 | a1656_no = no 117 | a1656_showbox = show / hide 118 | a1656_showcss = show / hide CSS 119 | 120 | a1656_settings_saved = The settings have been saved! 121 | a1656_module_saved = The module has been installed! 122 | a1656_error = An error has occurred! 123 | a1656_notice = Notice 124 | a1656_entry_saved = Entry saved 125 | a1656_entry_deleted = Entry deleted 126 | a1656_error_saved = Error while saving 127 | a1656_error_deleted = Error deleting 128 | 129 | a1656_dir = directory 130 | a1656_destdir = destination directory 131 | a1656_notdeleted = could not be deleted 132 | a1656_notcopyed = could not be copied 133 | a1656_deletemodule = Please manually delete modules installed via the add-on. 134 | a1656_emptyfield = empty or invalid 135 | a1656_charslenfield = is too short 136 | 137 | a1656_js_confirm = Do you really want to install the module? -------------------------------------------------------------------------------- /lang/dk_dk.lang: -------------------------------------------------------------------------------- 1 | # addon: httpheader dk_dk 1.0 2 | 3 | a1656_title = HTTP-header 4 | 5 | a1656_default = Indstillinger 6 | a1656_help = Hjælp 7 | 8 | a1656_head_basics = Indstillinger 9 | a1656_head_help = Online hjælp 10 | 11 | 12 | a1656_subheader_basic1 = Forskellige overskrifter 13 | a1656_subheader_basic2 = Sikkerhedsoverskrift 14 | 15 | 16 | # Backend output 17 | a1656_seo_modal_title = SEO-CheckUp 18 | a1656_seo_modal_analyze = Analyse er indlæst ... 19 | a1656_seo_modal_close = Luk 20 | a1656_seo_modal_error = Fejl 21 | a1656_seo_modal_legibility = Læsbarhed 22 | a1656_seo_modal_artnotfound = Artikel ikke fundet 23 | 24 | 25 | # Side: Generelt = Indstillinger 26 | a1656_bas_active = aktivere 27 | a1656_bas_remove = undertrykke 28 | a1656_bas_includebackend = Inkluder backend 29 | a1656_bas_property = Ejendom 30 | 31 | a1656_bas_h_connection = Forbindelse: keep-alive 32 | a1656_bas_h_vary = Vary: accept-encoding 33 | a1656_bas_h_server = Serveridentifikator 34 | a1656_bas_h_poweredby = X-Powered-By 35 | a1656_bas_h_contenttype = X-Content-Type-Options: nosniff 36 | a1656_bas_h_frame = X-Frame-Options 37 | a1656_bas_h_xss = X-XSS-beskyttelse 38 | a1656_bas_h_xss_block = Mode: Blokering 39 | a1656_bas_h_referer = Referrer-Policy 40 | a1656_bas_h_transport = Strict-Transport-Security 41 | a1656_bas_h_transport_maxage = Gyldighed (sek.) 42 | a1656_bas_h_transport_subdomæner = Inklusive subdomæner 43 | a1656_bas_h_csp = Content-Security-Policy (Politik for indholdssikkerhed) 44 | a1656_bas_h_csp_noeditor = Brug inputfelt i stedet for valg 45 | a1656_bas_h_csp_editor = Definer egenskaber 46 | a1656_bas_h_csp_definition = Gem CSP-definition 47 | a1656_bas_h_csp_definition_example = Format: Content-Security-Policy: default-src https: 'unsafe-inline'; frame-ancestors 'none'; 48 | a1656_bas_h_csp_url_example = URL: https://www.domain.de 49 | a1656_bas_h_fpp = funktion/tilladelsespolitik 50 | a1656_bas_h_fpp_noeditor = brug inputfelter i stedet for valg 51 | a1656_bas_h_fpp_editor = Definer egenskaber 52 | a1656_bas_h_fpp_definition_f = Opbevarer funktionsdefinition 53 | a1656_bas_h_fpp_definition_p = Lagre definition af tilladelser 54 | a1656_bas_h_fpp_definition_f_example = Format: Feature-Policy: camera 'none'; microphone self; 55 | a1656_bas_h_fpp_definition_p_example = Format: Tilladelsespolitik: camera=(), microphone=(self) 56 | 57 | a1656_bas_h_csp_default = default-src 58 | a1656_bas_h_csp_img = img-src 59 | a1656_bas_h_csp_media = media-src 60 | a1656_bas_h_csp_font = font-src 61 | a1656_bas_h_csp_script = script-src 62 | a1656_bas_h_csp_style = style-src 63 | a1656_bas_h_csp_object = object-src 64 | a1656_bas_h_csp_form = form-action 65 | a1656_bas_h_csp_frame = frame-src 66 | a1656_bas_h_csp_frameanc = frame-ancestors 67 | a1656_bas_h_csp_connect = connect-src 68 | a1656_bas_h_csp_manifest = manifest-src 69 | 70 | a1656_bas_h_fpp_camera = kamera 71 | a1656_bas_h_fpp_geolocation = geolocation 72 | a1656_bas_h_fpp_gyro = gyroskop 73 | a1656_bas_h_fpp_magnet = magnetometer 74 | a1656_bas_h_fpp_micro = mikrofon 75 | a1656_bas_h_fpp_usb = usb 76 | a1656_bas_h_fpp_docdomain = dokument-domæne 77 | a1656_bas_h_fpp_fullscreen = fuld skærm 78 | a1656_bas_h_fpp_payment = betaling 79 | 80 | a1656_bas_h_editor_https = https: 81 | a1656_bas_h_editor_data = data: 82 | a1656_bas_h_editor_blob = blob: 83 | a1656_bas_h_editor_self = self 84 | a1656_bas_h_editor_inline = usikker-inline 85 | a1656_bas_h_editor_eval = usikker-eval 86 | a1656_bas_h_editor_hashes = usikre hashes 87 | a1656_bas_h_editor_none = ingen 88 | 89 | 90 | # Andre standardindstillinger 91 | a1656_example = prøve 92 | a1656_examples = Eksempler... 93 | a1656_overview = Oversigt: 94 | 95 | a1656_search_all = alle 96 | a1656_search_noselection = - ingen udvælgelse -. 97 | a1656_search_sort = view 98 | a1656_search_sort_onlyactive = kun aktive poster (online) 99 | a1656_search_sort_onlyinactive = kun deaktiverede poster (offline) 100 | a1656_search_keyword = søgeord 101 | a1656_search_submit = søgning 102 | a1656_search_reset = nulstiller søgning 103 | a1656_search_notfound = Ingen poster fundet. 104 | a1656_search_more = flere muligheder 105 | a1656_search_cat = kategori 106 | a1656_search_maincat = hovedkategori 107 | a1656_search_archive = viser kun arkivposter 108 | 109 | a1656_edit = ændre 110 | a1656_delete = slette 111 | a1656_online = online 112 | a1656_offline = offline 113 | a1656_new = tilføj 114 | a1656_save = gemme 115 | a1656_yes = ja 116 | a1656_no = nej 117 | a1656_showbox = vis/skjul 118 | a1656_showcss = Vis/skjul CSS 119 | 120 | a1656_settings_saved = Indstillingerne er blevet gemt! 121 | a1656_module_saved = Modulet blev installeret! 122 | a1656_error = Der er opstået en fejl! 123 | a1656_notice = Meddelelse 124 | a1656_entry_saved = Opbevaret post 125 | a1656_entry_deleted = Post slettet 126 | a1656_error_saved = Fejl under lagring 127 | a1656_error_deleted = Fejl under sletning 128 | 129 | a1656_dir = Vejviser 130 | a1656_destdir = Destinationsmappe 131 | a1656_notdeleted = kunne ikke slettes 132 | a1656_notcopyed = kunne ikke kopieres 133 | a1656_deletemodule = Slet venligst moduler, der er installeret via tilføjelsen i hånden. 134 | a1656_emptyfield = tomt eller ugyldigt 135 | a1656_charslenfield = er for kort 136 | 137 | a1656_js_confirm = Ønsker du virkelig at installere modulet? -------------------------------------------------------------------------------- /lang/nl_nl.lang: -------------------------------------------------------------------------------- 1 | # addon: httpheader nl_nl 1.0 2 | 3 | a1656_title = HTTP-header 4 | 5 | a1656_default = Instellingen 6 | a1656_help = Help 7 | 8 | a1656_head_basics = Instellingen 9 | a1656_head_help = Online hulp 10 | 11 | 12 | a1656_subheader_basic1 = Diverse headers 13 | a1656_subheader_basic2 = Beveiligingsheader 14 | 15 | 16 | # Backend output 17 | a1656_seo_modal_title = SEO-CheckUp 18 | a1656_seo_modal_analyze = Analyse is geladen ... 19 | a1656_seo_modal_close = Sluiten 20 | a1656_seo_modal_error = Fout 21 | a1656_seo_modal_legibility = Leesbaarheid 22 | a1656_seo_modal_artnotfound = Artikel niet gevonden 23 | 24 | 25 | # Pagina: Algemeen = Instellingen 26 | a1656_bas_active = activeren 27 | a1656_bas_remove = onderdrukken 28 | a1656_bas_includebackend = Include backend 29 | a1656_bas_property = Eigendom 30 | 31 | a1656_bas_h_connection = Connection: keep-alive 32 | a1656_bas_h_vary = Vary: accept-encoding 33 | a1656_bas_h_server = Identificatiecode server 34 | a1656_bas_h_poweredby = X-Powered-By 35 | a1656_bas_h_contenttype = X-Content-Type-Options: nosniff 36 | a1656_bas_h_frame = X-Frame-Options 37 | a1656_bas_h_xss = X-XSS-bescherming 38 | a1656_bas_h_xss_block = Modus: Blokkeren 39 | a1656_bas_h_referer = Referrer-Policy 40 | a1656_bas_h_transport = Strict-Transport-Security 41 | a1656_bas_h_transport_maxage = Geldigheid (sec.) 42 | a1656_bas_h_transport_subdomains = Inclusief subdomeinen 43 | a1656_bas_h_csp = Content-Security-Policy 44 | a1656_bas_h_csp_noeditor = Gebruik invoerveld in plaats van selectie 45 | a1656_bas_h_csp_editor = Definieer eigenschappen 46 | a1656_bas_h_csp_definition = CSP-definitie opslaan 47 | a1656_bas_h_csp_definition_example = Format: Content-Security-Policy: default-src https: 'unsafe-inline'; frame-ancestors 'none'; 48 | a1656_bas_h_csp_url_example = URL: https://www.domain.de 49 | a1656_bas_h_fpp = kenmerk/toelatingsbeleid 50 | a1656_bas_h_fpp_noeditor = gebruik invoervelden in plaats van selectie 51 | a1656_bas_h_fpp_editor = Definieer eigenschappen 52 | a1656_bas_h_fpp_definition_f = Store feature definition 53 | a1656_bas_h_fpp_definition_p = Store permissions definition 54 | a1656_bas_h_fpp_definition_f_example = Format: Feature-Policy: camera 'none'; microfoon self; 55 | a1656_bas_h_fpp_definition_p_example = Format: Permissions-Policy: camera=(), microphone=(self) 56 | 57 | a1656_bas_h_csp_default = default-src 58 | a1656_bas_h_csp_img = img-src 59 | a1656_bas_h_csp_media = media-src 60 | a1656_bas_h_csp_font = font-src 61 | a1656_bas_h_csp_script = script-src 62 | a1656_bas_h_csp_style = style-src 63 | a1656_bas_h_csp_object = object-src 64 | a1656_bas_h_csp_form = form-action 65 | a1656_bas_h_csp_frame = frame-src 66 | a1656_bas_h_csp_frameanc = frame-ancestors 67 | a1656_bas_h_csp_connect = connect-src 68 | a1656_bas_h_csp_manifest = manifest-src 69 | 70 | a1656_bas_h_fpp_camera = camera 71 | a1656_bas_h_fpp_geolocation = geolocatie 72 | a1656_bas_h_fpp_gyro = gyroscoop 73 | a1656_bas_h_fpp_magnet = magnetometer 74 | a1656_bas_h_fpp_micro = microfoon 75 | a1656_bas_h_fpp_usb = usb 76 | a1656_bas_h_fpp_docdomain = document-domain 77 | a1656_bas_h_fpp_fullscreen = volledig scherm 78 | a1656_bas_h_fpp_payment = betaling 79 | 80 | a1656_bas_h_editor_https = https: 81 | a1656_bas_h_editor_data = data: 82 | a1656_bas_h_editor_blob = blob: 83 | a1656_bas_h_editor_self = self 84 | a1656_bas_h_editor_inline = unsafe-inline 85 | a1656_bas_h_editor_eval = unsafe-eval 86 | a1656_bas_h_editor_hashes = onveilige-hashes 87 | a1656_bas_h_editor_none = none 88 | 89 | 90 | # Other defaults 91 | a1656_voorbeeld = monster 92 | a1656_voorbeelden = Voorbeelden... 93 | a1656_overview = Overzicht: 94 | 95 | a1656_search_all = all 96 | a1656_search_noselection = - geen selectie -. 97 | a1656_search_sort = weergave 98 | a1656_search_sort_onlyactive = alleen actieve vermeldingen (online) 99 | a1656_search_sort_onlyinactive = alleen gedeactiveerde vermeldingen (offline) 100 | a1656_search_keyword = zoekterm 101 | a1656_search_submit = zoeken 102 | a1656_search_reset = reset zoeken 103 | a1656_search_notfound = Geen vermeldingen gevonden. 104 | a1656_search_more = meer opties 105 | a1656_search_cat = categorie 106 | a1656_search_maincat = hoofdcategorie 107 | a1656_search_archive = alleen archiefvermeldingen tonen 108 | 109 | a1656_edit = veranderen 110 | a1656_delete = verwijderen 111 | a1656_online = online 112 | a1656_offline = offline 113 | a1656_new = toevoegen 114 | a1656_save = opslaan 115 | a1656_yes = ja 116 | a1656_no = no 117 | a1656_showbox = tonen/verbergen 118 | a1656_showcss = toon/verberg CSS 119 | 120 | a1656_settings_saved = De instellingen zijn opgeslagen! 121 | a1656_module_saved = De module is geïnstalleerd! 122 | a1656_error = Er is een fout opgetreden! 123 | a1656_notice = Kennisgeving 124 | a1656_entry_saved = Opgeslagen item 125 | a1656_entry_deleted = Toegang verwijderd 126 | a1656_error_saved = Fout tijdens opslaan 127 | a1656_error_deleted = Fout tijdens verwijderen 128 | 129 | a1656_dir = Directory 130 | a1656_destdir = Bestemmingsdirectory 131 | a1656_notdeleted = kon niet worden verwijderd 132 | a1656_notcopyed = kon niet worden gekopieerd 133 | a1656_deletemodule = Verwijder modules die via de addon zijn geïnstalleerd met de hand. 134 | a1656_emptyfield = leeg of ongeldig 135 | a1656_charslenfield = is te kort 136 | 137 | a1656_js_confirm = Wilt u de module echt installeren? -------------------------------------------------------------------------------- /lang/de_de.lang: -------------------------------------------------------------------------------- 1 | # addon: httpheader de_de 1.0 2 | 3 | a1656_title = HTTP-Header 4 | 5 | a1656_default = Einstellungen 6 | a1656_help = Hilfe 7 | 8 | a1656_head_basics = Einstellungen 9 | a1656_head_help = Onlinehilfe 10 | 11 | 12 | a1656_subheader_basic1 = Verschiedene Header 13 | a1656_subheader_basic2 = Security-Header 14 | 15 | 16 | # Backend-Ausgaben 17 | a1656_seo_modal_title = SEO-CheckUp 18 | a1656_seo_modal_analyze = Analyse wird geladen ... 19 | a1656_seo_modal_close = Schließen 20 | a1656_seo_modal_error = Fehler 21 | a1656_seo_modal_legibility = Lesbarkeit 22 | a1656_seo_modal_artnotfound = Artikel nicht gefunden 23 | 24 | 25 | # Seite: Allgemein = Einstellungen 26 | a1656_bas_active = aktivieren 27 | a1656_bas_remove = unterdrücken 28 | a1656_bas_includebackend = Inklusive Backend 29 | a1656_bas_property = Eigenschaft 30 | 31 | a1656_bas_h_connection = Connection: keep-alive 32 | a1656_bas_h_vary = Vary: Accept-Encoding 33 | a1656_bas_h_server = Serverkennung 34 | a1656_bas_h_poweredby = X-Powered-By 35 | a1656_bas_h_contenttype = X-Content-Type-Options: nosniff 36 | a1656_bas_h_frame = X-Frame-Options 37 | a1656_bas_h_xss = X-XSS-Protection 38 | a1656_bas_h_xss_block = Modus: Blockieren 39 | a1656_bas_h_referer = Referrer-Policy 40 | a1656_bas_h_transport = Strict-Transport-Security 41 | a1656_bas_h_transport_maxage = Gültigkeit (sek.) 42 | a1656_bas_h_transport_subdomains = Inklusive SubDomains 43 | a1656_bas_h_csp = Content-Security-Policy 44 | a1656_bas_h_csp_noeditor = Eingabefeld anstatt Auswahl nutzen 45 | a1656_bas_h_csp_editor = Eigenschaften definieren 46 | a1656_bas_h_csp_definition = CSP-Definition hinterlegen 47 | a1656_bas_h_csp_definition_example = Format: Content-Security-Policy: default-src https: 'unsafe-inline'; frame-ancestors 'none'; 48 | a1656_bas_h_csp_url_example = URL: https://www.domain.de 49 | a1656_bas_h_fpp = Feature-/Permissions-Policy 50 | a1656_bas_h_fpp_noeditor = Eingabefelder anstatt Auswahl nutzen 51 | a1656_bas_h_fpp_editor = Eigenschaften definieren 52 | a1656_bas_h_fpp_definition_f = Feature-Definition hinterlegen 53 | a1656_bas_h_fpp_definition_p = Permissions-Definition hinterlegen 54 | a1656_bas_h_fpp_definition_f_example = Format: Feature-Policy: camera 'none'; microphone self; 55 | a1656_bas_h_fpp_definition_p_example = Format: Permissions-Policy: camera=(), microphone=(self) 56 | 57 | a1656_bas_h_csp_default = default-src 58 | a1656_bas_h_csp_img = img-src 59 | a1656_bas_h_csp_media = media-src 60 | a1656_bas_h_csp_font = font-src 61 | a1656_bas_h_csp_script = script-src 62 | a1656_bas_h_csp_style = style-src 63 | a1656_bas_h_csp_object = object-src 64 | a1656_bas_h_csp_form = form-action 65 | a1656_bas_h_csp_frame = frame-src 66 | a1656_bas_h_csp_frameanc = frame-ancestors 67 | a1656_bas_h_csp_connect = connect-src 68 | a1656_bas_h_csp_manifest = manifest-src 69 | 70 | a1656_bas_h_fpp_camera = camera 71 | a1656_bas_h_fpp_geolocation = geolocation 72 | a1656_bas_h_fpp_gyro = gyroscope 73 | a1656_bas_h_fpp_magnet = magnetometer 74 | a1656_bas_h_fpp_micro = microphone 75 | a1656_bas_h_fpp_usb = usb 76 | a1656_bas_h_fpp_docdomain = document-domain 77 | a1656_bas_h_fpp_fullscreen = fullscreen 78 | a1656_bas_h_fpp_payment = payment 79 | 80 | a1656_bas_h_editor_https = https: 81 | a1656_bas_h_editor_data = data: 82 | a1656_bas_h_editor_blob = blob: 83 | a1656_bas_h_editor_self = self 84 | a1656_bas_h_editor_inline = unsafe-inline 85 | a1656_bas_h_editor_eval = unsafe-eval 86 | a1656_bas_h_editor_hashes = unsafe-hashes 87 | a1656_bas_h_editor_none = none 88 | 89 | 90 | # Sonstige Vorgaben 91 | a1656_example = Beispiel 92 | a1656_examples = Beispiele... 93 | a1656_overview = Übersicht: 94 | 95 | a1656_search_all = alle 96 | a1656_search_noselection = - keine Auswahl - 97 | a1656_search_sort = Ansicht 98 | a1656_search_sort_onlyactive = nur aktive Einträge (online) 99 | a1656_search_sort_onlyinactive = nur deaktivierte Einträge (offline) 100 | a1656_search_keyword = Suchbegriff 101 | a1656_search_submit = suchen 102 | a1656_search_reset = Suche zurücksetzen 103 | a1656_search_notfound = Es wurden keine Einträge gefunden. 104 | a1656_search_more = mehr Optionen 105 | a1656_search_cat = Kategorie 106 | a1656_search_maincat = Hauptkategorie 107 | a1656_search_archive = Nur Archiveinträge anzeigen 108 | 109 | a1656_edit = ändern 110 | a1656_delete = löschen 111 | a1656_online = online 112 | a1656_offline = offline 113 | a1656_new = hinzufügen 114 | a1656_save = Speichern 115 | a1656_yes = ja 116 | a1656_no = nein 117 | a1656_showbox = anzeigen/ausblenden 118 | a1656_showcss = CSS anzeigen/ausblenden 119 | 120 | a1656_settings_saved = Die Einstellungen wurden gespeichert! 121 | a1656_module_saved = Das Modul wurde installiert! 122 | a1656_error = Es ist ein Fehler aufgetreten! 123 | a1656_notice = Hinweis 124 | a1656_entry_saved = Eintrag gespeichert 125 | a1656_entry_deleted = Eintrag gelöscht 126 | a1656_error_saved = Fehler beim Speichern 127 | a1656_error_deleted = Fehler beim Löschen 128 | 129 | a1656_dir = Verzeichnis 130 | a1656_destdir = Zielverzeichnis 131 | a1656_notdeleted = konnte nicht gelöscht werden 132 | a1656_notcopyed = konnte nicht kopiert werden 133 | a1656_deletemodule = Bitte löschen Sie über das Addon installierte Module von Hand. 134 | a1656_emptyfield = leer oder ungültig 135 | a1656_charslenfield = ist zu kurz 136 | 137 | a1656_js_confirm = Wollen Sie das Modul wirklich installieren? -------------------------------------------------------------------------------- /install.php: -------------------------------------------------------------------------------- 1 | getProperty('package'); 12 | $error = ""; 13 | 14 | 15 | //Vorgaben vornehmen 16 | if (!$this->hasConfig()): 17 | $this->setConfig('config', [ 18 | 'h_connection' => 'checked', 19 | 'h_connection_be' => '', 20 | 'h_vary' => 'checked', 21 | 'h_vary_be' => '', 22 | 'h_server' => 'checked', 23 | 'h_server_be' => '', 24 | 'h_poweredby' => 'checked', 25 | 'h_poweredby_be' => '', 26 | 'h_contenttype' => '', 27 | 'h_contenttype_be' => '', 28 | 'h_frame' => '', 29 | 'h_frame_be' => '', 30 | 'h_frame_option' => 'SAMEORIGIN', 31 | 'h_xss' => 'checked', 32 | 'h_xss_be' => '', 33 | 'h_xss_block' => 'checked', 34 | 'h_referer' => 'checked', 35 | 'h_referer_be' => '', 36 | 'h_referer_option' => 'same-origin', 37 | 'h_transport' => '', 38 | 'h_transport_be' => '', 39 | 'h_transport_maxage' => '31536000', 40 | 'h_transport_subdomains' => '', 41 | 'h_csp' => '', 42 | 'h_csp_be' => '', 43 | 'h_csp_noeditor' => '', 44 | 'h_csp_definition' => '', 45 | 46 | 'h_csp_default_https' => 'checked', 47 | 'h_csp_default_data' => '', 48 | 'h_csp_default_blob' => '', 49 | 'h_csp_default_self' => '', 50 | 'h_csp_default_inline' => '', 51 | 'h_csp_default_eval' => '', 52 | 'h_csp_default_hashes' => '', 53 | 'h_csp_default_none' => '', 54 | 'h_csp_default_url' => '', 55 | 56 | 'h_csp_img_https' => '', 57 | 'h_csp_img_data' => 'checked', 58 | 'h_csp_img_blob' => '', 59 | 'h_csp_img_self' => '', 60 | 'h_csp_img_inline' => '', 61 | 'h_csp_img_eval' => '', 62 | 'h_csp_img_hashes' => '', 63 | 'h_csp_img_none' => '', 64 | 'h_csp_img_url' => '', 65 | 66 | 'h_csp_media_https' => '', 67 | 'h_csp_media_data' => '', 68 | 'h_csp_media_blob' => '', 69 | 'h_csp_media_self' => '', 70 | 'h_csp_media_inline' => '', 71 | 'h_csp_media_eval' => '', 72 | 'h_csp_media_hashes' => '', 73 | 'h_csp_media_none' => '', 74 | 'h_csp_media_url' => '', 75 | 76 | 'h_csp_font_https' => '', 77 | 'h_csp_font_data' => 'checked', 78 | 'h_csp_font_blob' => '', 79 | 'h_csp_font_self' => '', 80 | 'h_csp_font_inline' => '', 81 | 'h_csp_font_eval' => '', 82 | 'h_csp_font_hashes' => '', 83 | 'h_csp_font_none' => '', 84 | 'h_csp_font_url' => '', 85 | 86 | 'h_csp_script_https' => '', 87 | 'h_csp_script_data' => '', 88 | 'h_csp_script_blob' => '', 89 | 'h_csp_script_self' => '', 90 | 'h_csp_script_inline' => 'checked', 91 | 'h_csp_script_eval' => '', 92 | 'h_csp_script_hashes' => '', 93 | 'h_csp_script_none' => '', 94 | 'h_csp_script_url' => '', 95 | 96 | 'h_csp_style_https' => '', 97 | 'h_csp_style_data' => '', 98 | 'h_csp_style_blob' => '', 99 | 'h_csp_style_self' => '', 100 | 'h_csp_style_inline' => 'checked', 101 | 'h_csp_style_eval' => '', 102 | 'h_csp_style_hashes' => '', 103 | 'h_csp_style_none' => '', 104 | 'h_csp_style_url' => '', 105 | 106 | 'h_csp_object_https' => '', 107 | 'h_csp_object_data' => '', 108 | 'h_csp_object_blob' => '', 109 | 'h_csp_object_self' => '', 110 | 'h_csp_object_inline' => '', 111 | 'h_csp_object_eval' => '', 112 | 'h_csp_object_hashes' => '', 113 | 'h_csp_object_none' => '', 114 | 'h_csp_object_url' => '', 115 | 116 | 'h_csp_form_https' => '', 117 | 'h_csp_form_data' => '', 118 | 'h_csp_form_blob' => '', 119 | 'h_csp_form_self' => 'checked', 120 | 'h_csp_form_inline' => '', 121 | 'h_csp_form_eval' => '', 122 | 'h_csp_form_hashes' => '', 123 | 'h_csp_form_none' => '', 124 | 'h_csp_form_url' => '', 125 | 126 | 'h_csp_frame_https' => '', 127 | 'h_csp_frame_data' => '', 128 | 'h_csp_frame_blob' => '', 129 | 'h_csp_frame_self' => '', 130 | 'h_csp_frame_inline' => '', 131 | 'h_csp_frame_eval' => '', 132 | 'h_csp_frame_hashes' => '', 133 | 'h_csp_frame_none' => '', 134 | 'h_csp_frame_url' => '', 135 | 136 | 'h_csp_frameanc_https' => '', 137 | 'h_csp_frameanc_data' => '', 138 | 'h_csp_frameanc_blob' => '', 139 | 'h_csp_frameanc_self' => '', 140 | 'h_csp_frameanc_none' => 'checked', 141 | 'h_csp_frameanc_url' => '', 142 | 143 | 'h_csp_connect_https' => '', 144 | 'h_csp_connect_data' => '', 145 | 'h_csp_connect_blob' => '', 146 | 'h_csp_connect_self' => '', 147 | 'h_csp_connect_inline' => '', 148 | 'h_csp_connect_eval' => '', 149 | 'h_csp_connect_hashes' => '', 150 | 'h_csp_connect_none' => '', 151 | 'h_csp_connect_url' => '', 152 | 153 | 'h_csp_manifest_https' => '', 154 | 'h_csp_manifest_data' => '', 155 | 'h_csp_manifest_blob' => '', 156 | 'h_csp_manifest_self' => '', 157 | 'h_csp_manifest_inline' => '', 158 | 'h_csp_manifest_eval' => '', 159 | 'h_csp_manifest_hashes' => '', 160 | 'h_csp_manifest_none' => '', 161 | 'h_csp_manifest_url' => '', 162 | 163 | 164 | 'h_fpp' => '', 165 | 'h_fpp_be' => '', 166 | 'h_fpp_noeditor' => '', 167 | 'h_fpp_definition_f' => '', 168 | 'h_fpp_definition_p' => '', 169 | 170 | 'h_fpp_cam_self' => '', 171 | 'h_fpp_cam_none' => 'checked', 172 | 173 | 'h_fpp_geo_self' => '', 174 | 'h_fpp_geo_none' => 'checked', 175 | 176 | 'h_fpp_gyro_self' => '', 177 | 'h_fpp_gyro_none' => 'checked', 178 | 179 | 'h_fpp_mag_self' => '', 180 | 'h_fpp_mag_none' => 'checked', 181 | 182 | 'h_fpp_mic_self' => '', 183 | 'h_fpp_mic_none' => 'checked', 184 | 185 | 'h_fpp_usb_self' => '', 186 | 'h_fpp_usb_none' => 'checked', 187 | 188 | 'h_fpp_docdom_self' => '', 189 | 'h_fpp_docdom_none' => '', 190 | 191 | 'h_fpp_full_self' => '', 192 | 'h_fpp_full_none' => '', 193 | 194 | 'h_fpp_pay_self' => '', 195 | 'h_fpp_pay_none' => '', 196 | ]); 197 | endif; 198 | 199 | 200 | //Datenbank-Spalten anlegen, sofern noch nicht verfügbar 201 | 202 | 203 | //Module anlegen 204 | 205 | 206 | //Aktionen anlegen 207 | 208 | 209 | //Templates anlegen 210 | ?> -------------------------------------------------------------------------------- /functions/functions.inc.php: -------------------------------------------------------------------------------- 1 | ' 21 | $str = stripslashes($str); 22 | $str = htmlspecialchars($str, ENT_QUOTES); 23 | $str = trim($str); 24 | 25 | return $str; 26 | } 27 | endif; 28 | if (!function_exists('aFM_maskArray')): 29 | function aFM_maskArray($arr) 30 | { if (is_array($arr)): 31 | $arr = array_map(function($str) { return aFM_maskChar($str); }, $arr); 32 | endif; 33 | 34 | return $arr; 35 | } 36 | endif; 37 | if (!function_exists('aFM_maskSingleQuote')): 38 | function aFM_maskSingleQuote($str) 39 | { //Ersetzt Single-Quotes: ' 40 | return str_replace("'", "'", $str); 41 | } 42 | endif; 43 | if (!function_exists('aFM_maskDoubleQuote')): 44 | function aFM_maskDoubleQuote($str) 45 | { //Ersetzt Double-Quotes: " 46 | return str_replace('"', """, $str); 47 | } 48 | endif; 49 | if (!function_exists('aFM_maskSql')): 50 | function aFM_maskSql($str) 51 | { //Maskiert desn Wert für DB-Abfrage 52 | $s = array("\\", "\x00", "\n", "\r", "'", '"', "\x1a"); 53 | $r = array("\\\\","\\0","\\n", "\\r", "\'", '\"', "\\Z"); 54 | return str_replace($s, $r, $str); 55 | } 56 | endif; 57 | 58 | if (!function_exists('aFM_unmaskQuotes')): 59 | function aFM_unmaskQuotes($str) 60 | { //Demaskiert folgende Anführungszeichen: " ' 61 | return str_replace(array(""", "'"), array('"', "'"), $str); 62 | } 63 | endif; 64 | if (!function_exists('aFM_revChar')): 65 | function aFM_revChar($str) 66 | { //Demaskiert folgende Sonderzeichen: & " < > ' 67 | $chars = array("&quot;"=>'"', """=>'"', "&"=>"&", "<"=>"<", ">"=>">", """=>'"', "'"=>"'"); 68 | foreach ($chars as $key => $value): 69 | $str = str_replace($key, $value, $str); 70 | endforeach; 71 | 72 | return $str; 73 | } 74 | endif; 75 | 76 | if (!function_exists('aFM_blockTags')): 77 | function aFM_blockTags($str) 78 | { //Entfernt bekannte Tags (PHP, JS, HTML) 79 | if ($str != ""): 80 | $str = stripslashes($str); 81 | $str = str_replace("\xc2\xa0", ' ', $str); // als UTF8 ersetzen in nortmales WhiteSpace 82 | $str = strip_tags($str); 83 | $phps = array("/<\?php/i", "/<\?/i", "/<%/i", "/ 177 | 178 | 179 | 191 | 192 | 193 | 194 |
getProperty('author'); ?>
195 | -------------------------------------------------------------------------------- /boot.php: -------------------------------------------------------------------------------- 1 | getProperty('package'); 12 | //$this->setProperty('name', 'Wert'); 13 | 14 | //Berechtigungen deklarieren 15 | if (rex::isBackend() && is_object(rex::getUser())): 16 | rex_perm::register($mypage.'[]'); 17 | //rex_perm::register($mypage.'[admin]'); 18 | endif; 19 | 20 | 21 | //Userrechte prüfen 22 | $isAdmin = ( is_object(rex::getUser()) AND (rex::getUser()->hasPerm($mypage.'[admin]') OR rex::getUser()->isAdmin()) ) ? true : false; 23 | 24 | 25 | //Addon Einstellungen 26 | $config = rex_addon::get($mypage)->getConfig('config'); //Addon-Konfig einladen 27 | 28 | 29 | //Funktionen einladen/definieren 30 | //Backendfunktionen 31 | if (rex::isBackend() && rex::getUser()): 32 | require_once(rex_path::addon($mypage)."/functions/functions.inc.php"); 33 | endif; 34 | 35 | 36 | 37 | //alle Header ausgeben 38 | $fe = rex::isFrontend(); 39 | $be = rex::isBackend(); 40 | 41 | //Connection keep-alive 42 | if (@$config['h_connection'] == 'checked'): 43 | if ($fe || ($be && @$config['h_connection_be'] == 'checked')) { rex_response::setHeader('Connection', 'keep-alive'); } 44 | endif; 45 | 46 | 47 | //Vary Accept-Encoding 48 | if (@$config['h_vary'] == 'checked'): 49 | if ($fe || ($be && @$config['h_vary_be'] == 'checked')) { rex_response::setHeader('Vary', 'Accept-Encoding'); } 50 | endif; 51 | 52 | 53 | //Remove Server 54 | if (@$config['h_server'] == 'checked'): 55 | if ($fe || ($be && @$config['h_server_be'] == 'checked')) { header_remove("Server"); rex_response::setHeader('Server', 'always unset'); } 56 | endif; 57 | 58 | 59 | //Remove X-Powered-By 60 | if (@$config['h_poweredby'] == 'checked'): 61 | if ($fe || ($be && @$config['h_poweredby_be'] == 'checked')) { header_remove("X-Powered-By"); rex_response::setHeader('X-Powered-By', 'always unset'); } 62 | endif; 63 | 64 | 65 | //X-Content-Type-Options 66 | if (@$config['h_contenttype'] == 'checked'): 67 | if ($fe || ($be && @$config['h_contenttype_be'] == 'checked')) { rex_response::setHeader('X-Content-Type-Options', 'nosniff'); } 68 | endif; 69 | 70 | 71 | //X-Frame-Options 72 | if (@$config['h_frame'] == 'checked'): 73 | if ($fe || ($be && @$config['h_frame_be'] == 'checked')) { rex_response::setHeader('X-Frame-Options', ''.@$config['h_frame_option'].''); } 74 | endif; 75 | 76 | 77 | //X-XSS-Protection 78 | if (@$config['h_xss'] == 'checked'): 79 | $opt = (@$config['h_xss_block'] == 'checked') ? '; mode=block' : ''; 80 | 81 | if ($fe || ($be && @$config['h_xss_be'] == 'checked')) { rex_response::setHeader('X-XSS-Protection', '1'.$opt); } 82 | endif; 83 | 84 | 85 | //Referrer-Policy 86 | if (@$config['h_referer'] == 'checked'): 87 | if ($fe || ($be && @$config['h_referer_be'] == 'checked')) { rex_response::setHeader('Referrer-Policy', ''.@$config['h_referer_option'].''); } 88 | endif; 89 | 90 | 91 | //Strict-Transport-Security 92 | if (@$config['h_transport'] == 'checked'): 93 | $max = intval(@$config['h_transport_maxage']); 94 | $opt = ($max > 0) ? $max : '31536000'; 95 | $opt .= (@$config['h_transport_subdomains'] == 'checked') ? '; includeSubDomains' : ''; 96 | 97 | if ($fe || ($be && @$config['h_transport_be'] == 'checked')) { rex_response::setHeader('Strict-Transport-Security', 'max-age='.$opt); } 98 | endif; 99 | 100 | 101 | //Content-Security-Policy 102 | if (@$config['h_csp'] == 'checked'): 103 | $opt = ""; 104 | 105 | $def = @$config['h_csp_definition']; 106 | if (@$config['h_csp_noeditor'] == 'checked' && !empty($def)): 107 | //eigene Definition wird genutzt 108 | $opt .= trim(preg_replace('/^Content-Security-Policy:/i', '', $def)); 109 | else: 110 | //Editor-Auswahl wird genutzt 111 | //default 112 | $tmp = ""; 113 | $tmp .= (@$config['h_csp_default_https'] == 'checked') ? " https:" : ''; 114 | $tmp .= (@$config['h_csp_default_data'] == 'checked') ? " data:" : ''; 115 | $tmp .= (@$config['h_csp_default_blob'] == 'checked') ? " blob:" : ''; 116 | $tmp .= (@$config['h_csp_default_self'] == 'checked') ? " 'self'" : ''; 117 | $tmp .= (@$config['h_csp_default_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 118 | $tmp .= (@$config['h_csp_default_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 119 | $tmp .= (@$config['h_csp_default_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 120 | $tmp .= (@$config['h_csp_default_none'] == 'checked') ? " 'none'" : ''; 121 | $tmp .= (!empty(@$config['h_csp_default_url'])) ? " ".@$config['h_csp_default_url'] : ''; 122 | $opt .= (!empty($tmp)) ? ' default-src'.$tmp.';' : ''; 123 | 124 | //img 125 | $tmp = ""; 126 | $tmp .= (@$config['h_csp_img_https'] == 'checked') ? " https:" : ''; 127 | $tmp .= (@$config['h_csp_img_data'] == 'checked') ? " data:" : ''; 128 | $tmp .= (@$config['h_csp_img_blob'] == 'checked') ? " blob:" : ''; 129 | $tmp .= (@$config['h_csp_img_self'] == 'checked') ? " 'self'" : ''; 130 | $tmp .= (@$config['h_csp_img_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 131 | $tmp .= (@$config['h_csp_img_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 132 | $tmp .= (@$config['h_csp_img_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 133 | $tmp .= (@$config['h_csp_img_none'] == 'checked') ? " 'none'" : ''; 134 | $tmp .= (!empty(@$config['h_csp_img_url'])) ? " ".@$config['h_csp_img_url'] : ''; 135 | $opt .= (!empty($tmp)) ? ' img-src'.$tmp.';' : ''; 136 | 137 | //media 138 | $tmp = ""; 139 | $tmp .= (@$config['h_csp_media_https'] == 'checked') ? " https:" : ''; 140 | $tmp .= (@$config['h_csp_media_data'] == 'checked') ? " data:" : ''; 141 | $tmp .= (@$config['h_csp_media_blob'] == 'checked') ? " blob:" : ''; 142 | $tmp .= (@$config['h_csp_media_self'] == 'checked') ? " 'self'" : ''; 143 | $tmp .= (@$config['h_csp_media_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 144 | $tmp .= (@$config['h_csp_media_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 145 | $tmp .= (@$config['h_csp_media_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 146 | $tmp .= (@$config['h_csp_media_none'] == 'checked') ? " 'none'" : ''; 147 | $tmp .= (!empty(@$config['h_csp_media_url'])) ? " ".@$config['h_csp_media_url'] : ''; 148 | $opt .= (!empty($tmp)) ? ' media-src'.$tmp.';' : ''; 149 | 150 | //font 151 | $tmp = ""; 152 | $tmp .= (@$config['h_csp_font_https'] == 'checked') ? " https:" : ''; 153 | $tmp .= (@$config['h_csp_font_data'] == 'checked') ? " data:" : ''; 154 | $tmp .= (@$config['h_csp_font_blob'] == 'checked') ? " blob:" : ''; 155 | $tmp .= (@$config['h_csp_font_self'] == 'checked') ? " 'self'" : ''; 156 | $tmp .= (@$config['h_csp_font_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 157 | $tmp .= (@$config['h_csp_font_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 158 | $tmp .= (@$config['h_csp_font_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 159 | $tmp .= (@$config['h_csp_font_none'] == 'checked') ? " 'none'" : ''; 160 | $tmp .= (!empty(@$config['h_csp_font_url'])) ? " ".@$config['h_csp_font_url'] : ''; 161 | $opt .= (!empty($tmp)) ? ' font-src'.$tmp.';' : ''; 162 | 163 | //script 164 | $tmp = ""; 165 | $tmp .= (@$config['h_csp_script_https'] == 'checked') ? " https:" : ''; 166 | $tmp .= (@$config['h_csp_script_data'] == 'checked') ? " data:" : ''; 167 | $tmp .= (@$config['h_csp_script_blob'] == 'checked') ? " blob:" : ''; 168 | $tmp .= (@$config['h_csp_script_self'] == 'checked') ? " 'self'" : ''; 169 | $tmp .= (@$config['h_csp_script_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 170 | $tmp .= (@$config['h_csp_script_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 171 | $tmp .= (@$config['h_csp_script_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 172 | $tmp .= (@$config['h_csp_script_none'] == 'checked') ? " 'none'" : ''; 173 | $tmp .= (!empty(@$config['h_csp_script_url'])) ? " ".@$config['h_csp_script_url'] : ''; 174 | $opt .= (!empty($tmp)) ? ' script-src'.$tmp.';' : ''; 175 | 176 | //style 177 | $tmp = ""; 178 | $tmp .= (@$config['h_csp_style_https'] == 'checked') ? " https:" : ''; 179 | $tmp .= (@$config['h_csp_style_data'] == 'checked') ? " data:" : ''; 180 | $tmp .= (@$config['h_csp_style_blob'] == 'checked') ? " blob:" : ''; 181 | $tmp .= (@$config['h_csp_style_self'] == 'checked') ? " 'self'" : ''; 182 | $tmp .= (@$config['h_csp_style_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 183 | $tmp .= (@$config['h_csp_style_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 184 | $tmp .= (@$config['h_csp_style_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 185 | $tmp .= (@$config['h_csp_style_none'] == 'checked') ? " 'none'" : ''; 186 | $tmp .= (!empty(@$config['h_csp_style_url'])) ? " ".@$config['h_csp_style_url'] : ''; 187 | $opt .= (!empty($tmp)) ? ' style-src'.$tmp.';' : ''; 188 | 189 | //object 190 | $tmp = ""; 191 | $tmp .= (@$config['h_csp_object_https'] == 'checked') ? " https:" : ''; 192 | $tmp .= (@$config['h_csp_object_data'] == 'checked') ? " data:" : ''; 193 | $tmp .= (@$config['h_csp_object_blob'] == 'checked') ? " blob:" : ''; 194 | $tmp .= (@$config['h_csp_object_self'] == 'checked') ? " 'self'" : ''; 195 | $tmp .= (@$config['h_csp_object_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 196 | $tmp .= (@$config['h_csp_object_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 197 | $tmp .= (@$config['h_csp_object_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 198 | $tmp .= (@$config['h_csp_object_none'] == 'checked') ? " 'none'" : ''; 199 | $tmp .= (!empty(@$config['h_csp_object_url'])) ? " ".@$config['h_csp_object_url'] : ''; 200 | $opt .= (!empty($tmp)) ? ' object-src'.$tmp.';' : ''; 201 | 202 | //form-action 203 | $tmp = ""; 204 | $tmp .= (@$config['h_csp_form_https'] == 'checked') ? " https:" : ''; 205 | $tmp .= (@$config['h_csp_form_data'] == 'checked') ? " data:" : ''; 206 | $tmp .= (@$config['h_csp_form_blob'] == 'checked') ? " blob:" : ''; 207 | $tmp .= (@$config['h_csp_form_self'] == 'checked') ? " 'self'" : ''; 208 | $tmp .= (@$config['h_csp_form_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 209 | $tmp .= (@$config['h_csp_form_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 210 | $tmp .= (@$config['h_csp_form_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 211 | $tmp .= (@$config['h_csp_form_none'] == 'checked') ? " 'none'" : ''; 212 | $tmp .= (!empty(@$config['h_csp_form_url'])) ? " ".@$config['h_csp_form_url'] : ''; 213 | $opt .= (!empty($tmp)) ? ' form-action'.$tmp.';' : ''; 214 | 215 | //frame 216 | $tmp = ""; 217 | $tmp .= (@$config['h_csp_frame_https'] == 'checked') ? " https:" : ''; 218 | $tmp .= (@$config['h_csp_frame_data'] == 'checked') ? " data:" : ''; 219 | $tmp .= (@$config['h_csp_frame_blob'] == 'checked') ? " blob:" : ''; 220 | $tmp .= (@$config['h_csp_frame_self'] == 'checked') ? " 'self'" : ''; 221 | $tmp .= (@$config['h_csp_frame_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 222 | $tmp .= (@$config['h_csp_frame_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 223 | $tmp .= (@$config['h_csp_frame_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 224 | $tmp .= (@$config['h_csp_frame_none'] == 'checked') ? " 'none'" : ''; 225 | $tmp .= (!empty(@$config['h_csp_frame_url'])) ? " ".@$config['h_csp_frame_url'] : ''; 226 | $opt .= (!empty($tmp)) ? ' frame-src'.$tmp.';' : ''; 227 | 228 | //frame-ancestors 229 | $tmp = ""; 230 | $tmp .= (@$config['h_csp_frameanc_https'] == 'checked') ? " https:" : ''; 231 | $tmp .= (@$config['h_csp_frameanc_data'] == 'checked') ? " data:" : ''; 232 | $tmp .= (@$config['h_csp_frameanc_blob'] == 'checked') ? " blob:" : ''; 233 | $tmp .= (@$config['h_csp_frameanc_self'] == 'checked') ? " 'self'" : ''; 234 | $tmp .= (@$config['h_csp_frameanc_none'] == 'checked') ? " 'none'" : ''; 235 | $tmp .= (!empty(@$config['h_csp_frameanc_url'])) ? " ".@$config['h_csp_frameanc_url'] : ''; 236 | $opt .= (!empty($tmp)) ? ' frame-ancestors'.$tmp.';' : ''; 237 | 238 | //connect 239 | $tmp = ""; 240 | $tmp .= (@$config['h_csp_connect_https'] == 'checked') ? " https:" : ''; 241 | $tmp .= (@$config['h_csp_connect_data'] == 'checked') ? " data:" : ''; 242 | $tmp .= (@$config['h_csp_connect_blob'] == 'checked') ? " blob:" : ''; 243 | $tmp .= (@$config['h_csp_connect_self'] == 'checked') ? " 'self'" : ''; 244 | $tmp .= (@$config['h_csp_connect_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 245 | $tmp .= (@$config['h_csp_connect_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 246 | $tmp .= (@$config['h_csp_connect_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 247 | $tmp .= (@$config['h_csp_connect_none'] == 'checked') ? " 'none'" : ''; 248 | $tmp .= (!empty(@$config['h_csp_connect_url'])) ? " ".@$config['h_csp_connect_url'] : ''; 249 | $opt .= (!empty($tmp)) ? ' connect-src'.$tmp.';' : ''; 250 | 251 | //manifest 252 | $tmp = ""; 253 | $tmp .= (@$config['h_csp_manifest_https'] == 'checked') ? " https:" : ''; 254 | $tmp .= (@$config['h_csp_manifest_data'] == 'checked') ? " data:" : ''; 255 | $tmp .= (@$config['h_csp_manifest_blob'] == 'checked') ? " blob:" : ''; 256 | $tmp .= (@$config['h_csp_manifest_self'] == 'checked') ? " 'self'" : ''; 257 | $tmp .= (@$config['h_csp_manifest_inline'] == 'checked') ? " 'unsafe-inline'" : ''; 258 | $tmp .= (@$config['h_csp_manifest_eval'] == 'checked') ? " 'unsafe-eval'" : ''; 259 | $tmp .= (@$config['h_csp_manifest_hashes'] == 'checked') ? " 'unsafe-hashes'" : ''; 260 | $tmp .= (@$config['h_csp_manifest_none'] == 'checked') ? " 'none'" : ''; 261 | $tmp .= (!empty(@$config['h_csp_manifest_url'])) ? " ".@$config['h_csp_manifest_url'] : ''; 262 | $opt .= (!empty($tmp)) ? ' manifest-src'.$tmp.';' : ''; 263 | 264 | endif; 265 | 266 | if ($fe || ($be && @$config['h_csp_be'] == 'checked')): 267 | rex_response::setHeader('X-Content-Security-Policy', $opt); 268 | rex_response::setHeader('X-WebKit-CSP', $opt); 269 | rex_response::setHeader('Content-Security-Policy', $opt); 270 | endif; 271 | endif; 272 | 273 | 274 | //Featuer-/Permissions-Policy 275 | if (@$config['h_fpp'] == 'checked'): 276 | $opt_f = $opt_p = ""; 277 | 278 | $def_f = @$config['h_fpp_definition_f']; 279 | $def_p = @$config['h_fpp_definition_p']; 280 | if (@$config['h_fpp_noeditor'] == 'checked' && (!empty($def_f) || !empty($def_p))): 281 | //eigene Definition wird genutzt 282 | $opt_f .= trim(preg_replace('/^Feature-Policy:/i', '', $def_f)); 283 | $opt_p .= trim(preg_replace('/^Permissions-Policy:/i', '', $def_p)); 284 | else: 285 | //Editor-Auswahl wird genutzt 286 | //camera 287 | $tmp = ""; 288 | $tmp .= (@$config['h_fpp_cam_self'] == 'checked') ? " 'self'" : ''; 289 | $tmp .= (@$config['h_fpp_cam_none'] == 'checked') ? " 'none'" : ''; 290 | $opt_f .= (!empty($tmp)) ? ' camera'.$tmp.';' : ''; 291 | $opt_p .= (!empty($tmp)) ? ' camera=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 292 | 293 | //geo 294 | $tmp = ""; 295 | $tmp .= (@$config['h_fpp_geo_self'] == 'checked') ? " 'self'" : ''; 296 | $tmp .= (@$config['h_fpp_geo_none'] == 'checked') ? " 'none'" : ''; 297 | $opt_f .= (!empty($tmp)) ? ' geolocation'.$tmp.';' : ''; 298 | $opt_p .= (!empty($tmp)) ? ' geolocation=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 299 | 300 | //gyro 301 | $tmp = ""; 302 | $tmp .= (@$config['h_fpp_gyro_self'] == 'checked') ? " 'self'" : ''; 303 | $tmp .= (@$config['h_fpp_gyro_none'] == 'checked') ? " 'none'" : ''; 304 | $opt_f .= (!empty($tmp)) ? ' gyroscope'.$tmp.';' : ''; 305 | $opt_p .= (!empty($tmp)) ? ' gyroscope=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 306 | 307 | //mag 308 | $tmp = ""; 309 | $tmp .= (@$config['h_fpp_mag_self'] == 'checked') ? " 'self'" : ''; 310 | $tmp .= (@$config['h_fpp_mag_none'] == 'checked') ? " 'none'" : ''; 311 | $opt_f .= (!empty($tmp)) ? ' magnetometer'.$tmp.';' : ''; 312 | $opt_p .= (!empty($tmp)) ? ' magnetometer=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 313 | 314 | //mic 315 | $tmp = ""; 316 | $tmp .= (@$config['h_fpp_mic_self'] == 'checked') ? " 'self'" : ''; 317 | $tmp .= (@$config['h_fpp_mic_none'] == 'checked') ? " 'none'" : ''; 318 | $opt_f .= (!empty($tmp)) ? ' microphone'.$tmp.';' : ''; 319 | $opt_p .= (!empty($tmp)) ? ' microphone=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 320 | 321 | //usb 322 | $tmp = ""; 323 | $tmp .= (@$config['h_fpp_usb_self'] == 'checked') ? " 'self'" : ''; 324 | $tmp .= (@$config['h_fpp_usb_none'] == 'checked') ? " 'none'" : ''; 325 | $opt_f .= (!empty($tmp)) ? ' usb'.$tmp.';' : ''; 326 | $opt_p .= (!empty($tmp)) ? ' usb=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 327 | 328 | //docdom 329 | $tmp = ""; 330 | $tmp .= (@$config['h_fpp_docdom_self'] == 'checked') ? " 'self'" : ''; 331 | $tmp .= (@$config['h_fpp_docdom_none'] == 'checked') ? " 'none'" : ''; 332 | $opt_f .= (!empty($tmp)) ? ' document-domain'.$tmp.';' : ''; 333 | $opt_p .= (!empty($tmp)) ? ' document-domain=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 334 | 335 | //full 336 | $tmp = ""; 337 | $tmp .= (@$config['h_fpp_full_self'] == 'checked') ? " 'self'" : ''; 338 | $tmp .= (@$config['h_fpp_full_none'] == 'checked') ? " 'none'" : ''; 339 | $opt_f .= (!empty($tmp)) ? ' fullscreen'.$tmp.';' : ''; 340 | $opt_p .= (!empty($tmp)) ? ' fullscreen=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 341 | 342 | //pay 343 | $tmp = ""; 344 | $tmp .= (@$config['h_fpp_pay_self'] == 'checked') ? " 'self'" : ''; 345 | $tmp .= (@$config['h_fpp_pay_none'] == 'checked') ? " 'none'" : ''; 346 | $opt_f .= (!empty($tmp)) ? ' payment'.$tmp.';' : ''; 347 | $opt_p .= (!empty($tmp)) ? ' payment=('.trim(str_replace(array(" 'none'", "'"), '', $tmp)).'),' : ''; 348 | 349 | 350 | //letztes Komma entfernen 351 | $opt_p = preg_replace("/,$/i", '', $opt_p); 352 | endif; 353 | 354 | if ($fe || ($be && @$config['h_fpp_be'] == 'checked')): 355 | rex_response::setHeader('Feature-Policy', $opt_f); 356 | rex_response::setHeader('Permissions-Policy', $opt_p); 357 | endif; 358 | endif; 359 | 360 | ?> -------------------------------------------------------------------------------- /pages/default.inc.php: -------------------------------------------------------------------------------- 1 | getConfig('config'); //alte Config laden 17 | 18 | $newCfg = array_merge($newCfg, [ //neue Werte der Standardfelder hinzufügen 19 | 'h_connection' => rex_post('h_connection'), 20 | 'h_connection_be' => rex_post('h_connection_be'), 21 | 'h_vary' => rex_post('h_vary'), 22 | 'h_vary_be' => rex_post('h_vary_be'), 23 | 'h_server' => rex_post('h_server'), 24 | 'h_server_be' => rex_post('h_server_be'), 25 | 'h_poweredby' => rex_post('h_poweredby'), 26 | 'h_poweredby_be' => rex_post('h_poweredby_be'), 27 | 'h_contenttype' => rex_post('h_contenttype'), 28 | 'h_contenttype_be' => rex_post('h_contenttype_be'), 29 | 'h_frame' => rex_post('h_frame'), 30 | 'h_frame_be' => rex_post('h_frame_be'), 31 | 'h_frame_option' => rex_post('h_frame_option'), 32 | 'h_xss' => rex_post('h_xss'), 33 | 'h_xss_be' => rex_post('h_xss_be'), 34 | 'h_xss_block' => rex_post('h_xss_block'), 35 | 'h_referer' => rex_post('h_referer'), 36 | 'h_referer_be' => rex_post('h_referer_be'), 37 | 'h_referer_option' => rex_post('h_referer_option'), 38 | 'h_transport' => rex_post('h_transport'), 39 | 'h_transport_be' => rex_post('h_transport_be'), 40 | 'h_transport_maxage' => rex_post('h_transport_maxage'), 41 | 'h_transport_subdomains' => rex_post('h_transport_subdomains'), 42 | 'h_csp' => rex_post('h_csp'), 43 | 'h_csp_be' => rex_post('h_csp_be'), 44 | 'h_csp_noeditor' => rex_post('h_csp_noeditor'), 45 | 'h_csp_definition' => rex_post('h_csp_definition'), 46 | 47 | 'h_csp_default_https' => rex_post('h_csp_default_https'), 48 | 'h_csp_default_data' => rex_post('h_csp_default_data'), 49 | 'h_csp_default_blob' => rex_post('h_csp_default_blob'), 50 | 'h_csp_default_self' => rex_post('h_csp_default_self'), 51 | 'h_csp_default_inline' => rex_post('h_csp_default_inline'), 52 | 'h_csp_default_eval' => rex_post('h_csp_default_eval'), 53 | 'h_csp_default_hashes' => rex_post('h_csp_default_hashes'), 54 | 'h_csp_default_none' => rex_post('h_csp_default_none'), 55 | 'h_csp_default_url' => rex_post('h_csp_default_url'), 56 | 57 | 'h_csp_img_https' => rex_post('h_csp_img_https'), 58 | 'h_csp_img_data' => rex_post('h_csp_img_data'), 59 | 'h_csp_img_blob' => rex_post('h_csp_img_blob'), 60 | 'h_csp_img_self' => rex_post('h_csp_img_self'), 61 | 'h_csp_img_inline' => rex_post('h_csp_img_inline'), 62 | 'h_csp_img_eval' => rex_post('h_csp_img_eval'), 63 | 'h_csp_img_hashes' => rex_post('h_csp_img_hashes'), 64 | 'h_csp_img_none' => rex_post('h_csp_img_none'), 65 | 'h_csp_img_url' => rex_post('h_csp_img_url'), 66 | 67 | 'h_csp_media_https' => rex_post('h_csp_media_https'), 68 | 'h_csp_media_data' => rex_post('h_csp_media_data'), 69 | 'h_csp_media_blob' => rex_post('h_csp_media_blob'), 70 | 'h_csp_media_self' => rex_post('h_csp_media_self'), 71 | 'h_csp_media_inline' => rex_post('h_csp_media_inline'), 72 | 'h_csp_media_eval' => rex_post('h_csp_media_eval'), 73 | 'h_csp_media_hashes' => rex_post('h_csp_media_hashes'), 74 | 'h_csp_media_none' => rex_post('h_csp_media_none'), 75 | 'h_csp_media_url' => rex_post('h_csp_media_url'), 76 | 77 | 'h_csp_font_https' => rex_post('h_csp_font_https'), 78 | 'h_csp_font_data' => rex_post('h_csp_font_data'), 79 | 'h_csp_font_blob' => rex_post('h_csp_font_blob'), 80 | 'h_csp_font_self' => rex_post('h_csp_font_self'), 81 | 'h_csp_font_inline' => rex_post('h_csp_font_inline'), 82 | 'h_csp_font_eval' => rex_post('h_csp_font_eval'), 83 | 'h_csp_font_hashes' => rex_post('h_csp_font_hashes'), 84 | 'h_csp_font_none' => rex_post('h_csp_font_none'), 85 | 'h_csp_font_url' => rex_post('h_csp_font_url'), 86 | 87 | 'h_csp_script_https' => rex_post('h_csp_script_https'), 88 | 'h_csp_script_data' => rex_post('h_csp_script_data'), 89 | 'h_csp_script_blob' => rex_post('h_csp_script_blob'), 90 | 'h_csp_script_self' => rex_post('h_csp_script_self'), 91 | 'h_csp_script_inline' => rex_post('h_csp_script_inline'), 92 | 'h_csp_script_eval' => rex_post('h_csp_script_eval'), 93 | 'h_csp_script_hashes' => rex_post('h_csp_script_hashes'), 94 | 'h_csp_script_none' => rex_post('h_csp_script_none'), 95 | 'h_csp_script_url' => rex_post('h_csp_script_url'), 96 | 97 | 'h_csp_style_https' => rex_post('h_csp_style_https'), 98 | 'h_csp_style_data' => rex_post('h_csp_style_data'), 99 | 'h_csp_style_blob' => rex_post('h_csp_style_blob'), 100 | 'h_csp_style_self' => rex_post('h_csp_style_self'), 101 | 'h_csp_style_inline' => rex_post('h_csp_style_inline'), 102 | 'h_csp_style_eval' => rex_post('h_csp_style_eval'), 103 | 'h_csp_style_hashes' => rex_post('h_csp_style_hashes'), 104 | 'h_csp_style_none' => rex_post('h_csp_style_none'), 105 | 'h_csp_style_url' => rex_post('h_csp_style_url'), 106 | 107 | 'h_csp_object_https' => rex_post('h_csp_object_https'), 108 | 'h_csp_object_data' => rex_post('h_csp_object_data'), 109 | 'h_csp_object_blob' => rex_post('h_csp_object_blob'), 110 | 'h_csp_object_self' => rex_post('h_csp_object_self'), 111 | 'h_csp_object_inline' => rex_post('h_csp_object_inline'), 112 | 'h_csp_object_eval' => rex_post('h_csp_object_eval'), 113 | 'h_csp_object_hashes' => rex_post('h_csp_object_hashes'), 114 | 'h_csp_object_none' => rex_post('h_csp_object_none'), 115 | 'h_csp_object_url' => rex_post('h_csp_object_url'), 116 | 117 | 'h_csp_form_https' => rex_post('h_csp_form_https'), 118 | 'h_csp_form_data' => rex_post('h_csp_form_data'), 119 | 'h_csp_form_blob' => rex_post('h_csp_form_blob'), 120 | 'h_csp_form_self' => rex_post('h_csp_form_self'), 121 | 'h_csp_form_inline' => rex_post('h_csp_form_inline'), 122 | 'h_csp_form_eval' => rex_post('h_csp_form_eval'), 123 | 'h_csp_form_hashes' => rex_post('h_csp_form_hashes'), 124 | 'h_csp_form_none' => rex_post('h_csp_form_none'), 125 | 'h_csp_form_url' => rex_post('h_csp_form_url'), 126 | 127 | 'h_csp_frame_https' => rex_post('h_csp_frame_https'), 128 | 'h_csp_frame_data' => rex_post('h_csp_frame_data'), 129 | 'h_csp_frame_blob' => rex_post('h_csp_frame_blob'), 130 | 'h_csp_frame_self' => rex_post('h_csp_frame_self'), 131 | 'h_csp_frame_inline' => rex_post('h_csp_frame_inline'), 132 | 'h_csp_frame_eval' => rex_post('h_csp_frame_eval'), 133 | 'h_csp_frame_hashes' => rex_post('h_csp_frame_hashes'), 134 | 'h_csp_frame_none' => rex_post('h_csp_frame_none'), 135 | 'h_csp_frame_url' => rex_post('h_csp_frame_url'), 136 | 137 | 'h_csp_frameanc_https' => rex_post('h_csp_frameanc_https'), 138 | 'h_csp_frameanc_data' => rex_post('h_csp_frameanc_data'), 139 | 'h_csp_frameanc_blob' => rex_post('h_csp_frameanc_blob'), 140 | 'h_csp_frameanc_self' => rex_post('h_csp_frameanc_self'), 141 | 'h_csp_frameanc_none' => rex_post('h_csp_frameanc_none'), 142 | 'h_csp_frameanc_url' => rex_post('h_csp_frameanc_url'), 143 | 144 | 'h_csp_connect_https' => rex_post('h_csp_connect_https'), 145 | 'h_csp_connect_data' => rex_post('h_csp_connect_data'), 146 | 'h_csp_connect_blob' => rex_post('h_csp_connect_blob'), 147 | 'h_csp_connect_self' => rex_post('h_csp_connect_self'), 148 | 'h_csp_connect_inline' => rex_post('h_csp_connect_inline'), 149 | 'h_csp_connect_eval' => rex_post('h_csp_connect_eval'), 150 | 'h_csp_connect_hashes' => rex_post('h_csp_connect_hashes'), 151 | 'h_csp_connect_none' => rex_post('h_csp_connect_none'), 152 | 'h_csp_connect_url' => rex_post('h_csp_connect_url'), 153 | 154 | 'h_csp_manifest_https' => rex_post('h_csp_manifest_https'), 155 | 'h_csp_manifest_data' => rex_post('h_csp_manifest_data'), 156 | 'h_csp_manifest_blob' => rex_post('h_csp_manifest_blob'), 157 | 'h_csp_manifest_self' => rex_post('h_csp_manifest_self'), 158 | 'h_csp_manifest_inline' => rex_post('h_csp_manifest_inline'), 159 | 'h_csp_manifest_eval' => rex_post('h_csp_manifest_eval'), 160 | 'h_csp_manifest_hashes' => rex_post('h_csp_manifest_hashes'), 161 | 'h_csp_manifest_none' => rex_post('h_csp_manifest_none'), 162 | 'h_csp_manifest_url' => rex_post('h_csp_manifest_url'), 163 | 164 | 165 | 'h_fpp' => rex_post('h_fpp'), 166 | 'h_fpp_be' => rex_post('h_fpp_be'), 167 | 'h_fpp_noeditor' => rex_post('h_fpp_noeditor'), 168 | 'h_fpp_definition_f' => rex_post('h_fpp_definition_f'), 169 | 'h_fpp_definition_p' => rex_post('h_fpp_definition_p'), 170 | 171 | 'h_fpp_cam_self' => rex_post('h_fpp_cam_self'), 172 | 'h_fpp_cam_none' => rex_post('h_fpp_cam_none'), 173 | 174 | 'h_fpp_geo_self' => rex_post('h_fpp_geo_self'), 175 | 'h_fpp_geo_none' => rex_post('h_fpp_geo_none'), 176 | 177 | 'h_fpp_gyro_self' => rex_post('h_fpp_gyro_self'), 178 | 'h_fpp_gyro_none' => rex_post('h_fpp_gyro_none'), 179 | 180 | 'h_fpp_mag_self' => rex_post('h_fpp_mag_self'), 181 | 'h_fpp_mag_none' => rex_post('h_fpp_mag_none'), 182 | 183 | 'h_fpp_mic_self' => rex_post('h_fpp_mic_self'), 184 | 'h_fpp_mic_none' => rex_post('h_fpp_mic_none'), 185 | 186 | 'h_fpp_usb_self' => rex_post('h_fpp_usb_self'), 187 | 'h_fpp_usb_none' => rex_post('h_fpp_usb_none'), 188 | 189 | 'h_fpp_docdom_self' => rex_post('h_fpp_docdom_self'), 190 | 'h_fpp_docdom_none' => rex_post('h_fpp_docdom_none'), 191 | 192 | 'h_fpp_full_self' => rex_post('h_fpp_full_self'), 193 | 'h_fpp_full_none' => rex_post('h_fpp_full_none'), 194 | 195 | 'h_fpp_pay_self' => rex_post('h_fpp_pay_self'), 196 | 'h_fpp_pay_none' => rex_post('h_fpp_pay_none'), 197 | ]); 198 | 199 | $res = $this->setConfig('config', $newCfg); //Config speichern (ersetzt komplett die alte Config) 200 | 201 | //Rückmeldung 202 | echo ($res) ? rex_view::info($this->i18n('a1656_settings_saved')) : rex_view::warning($this->i18n('a1656_error')); 203 | endif; 204 | 205 | 206 | //reload Konfig 207 | $config = $this->getConfig('config'); 208 | $config = aFM_maskArray($config); 209 | 210 | //dump($config); 211 | ?> 212 | 213 | 214 | 215 | 216 | 1734 | 1735 | 1736 | 1737 |Die Verbindung soll nicht nach jeder Anfrage beendet werden, um die Ladegeschwindigkeit zu erhöhen.
1753 |Dieser Header ist u.U. relevant bei der Suchmaschinenoptimierung.
1754 |1755 |
Weitere Informationen:
1756 | https://de.ryte.com/wiki/
Der Client soll u.A. erfahren können, welche Komprimierung die Website verwendet.
1761 |Dieser Header ist u.U. relevant bei der Suchmaschinenoptimierung.
1762 |1763 |
Weitere Informationen:
1764 | https://de.ryte.com/wiki/
Über diesen Header kann je nach Servereinstellung die Ausgabe des Servertyps unterdrückt werden.
1769 | Allerdings kann der Webserver diesen Header ignorieren, wodurch diese Angaben weiterhin zurückgegeben werden.
Über diesen Header kann je nach Servereinstellung die Ausgabe der PHP-Version unterdrückt werden.
1774 | Allerdings kann der Webserver diesen Header ignorieren, wodurch diese Angaben weiterhin zurückgegeben werden.
1776 |
Weitere Informationen:
1777 | https://siwecos.de/wiki/
Mit diesem Header können Browser angewiesen werden, aufgerufene Dateien nicht als etwas anderes zu interpretieren als vom Inhaltstyp definiert.
1782 |1783 |
nosniff
1784 | wird auch dann erzwungen, wenn der Content-Type nicht angegeben ist
1786 |
Weitere Informationen:
1787 | https://siwecos.de/wiki/
Das Setzen dieses Headers hilft dabei, Angriffe über Framing-Mechanismen zu unterbinden.
1793 |1794 |
deny
1795 | Die Seite kann nicht in einem iFrame eingebettet werden, egal welches die aufrufende Webseite ist.
sameorigin
1797 | Die Seite kann nur als iFrame eingebettet werden, wenn beide von der gleichen Quellseite stammen.
1799 |
Weitere Informationen:
1800 | https://siwecos.de/wiki/
1801 |
1802 |
Der X-XSS-Header definiert, wie in Browsern eingebaute XSS-Filter konfiguriert/genutzt werden.
1806 |1807 |
Weitere Informationen:
1808 | https://siwecos.de/wiki/
1809 |
Mit der Referrer Policy wird geregelt, welche der Referrer-Informationen in Anfragen aufgenommen werden sollen und welche nicht.
1814 |1815 | 1816 |
no-referrer
1817 | Der Referer-Header wird vollständig weggelassen. Es werden keine Referrer-Informationen zusammen mit Anfragen gesendet.
no-referrer-when-downgrade
1820 | Dies ist das Standardverhalten, wenn keine Richtlinie angegeben ist oder wenn der angegebene Wert ungültig ist.
same-origin
1823 | Der Wert `same-origin` weist den Browser an, nur Referer Header zu senden, die von Ihrer Webseite gestellt werden. Wenn das Ziel eine andere Domain ist, werden keine Referrer-Informationen gesendet.
origin
1826 | Damit wird immer die Origin der auslösenden Seite in den Referer Informationen des Requests mitgegeben. Es werden allerdings keine Informationen zum genauen Pfad weitergegeben
strict-origin
1829 | Der Wert `strict-origin` weist den Browser an, als Referer Header immer die Ursprungs-Domain anzugeben.
1830 |
origin-when-cross-origin
1833 | Der Wert `origin-when-cross-origin` weist den Browser an, nur dann die vollständige Referrer-URL zu senden, wenn Sie auf der selben Domain bleiben. Sobald die Domain über HTTPS verlassen wird oder eine anderer Domain angesprochen wird, wird nur die Quell-Domain gesendet.
strict-origin-when-cross-origin
1836 | Wie bei strict-origin handelt es sich bei strict-origin-when-cross-origin ebenfalls um eine Verschärfung einer bestehenden Regel. Es gelten die Regeln von origin-when-cross-origin. Zusätzlich werden allerdings die Referer Informationen entfernt, wenn der Request von einer HTTPS Seite zu einer HTTP Seite ausgelöst wird.
unsafe-url
1839 | Mit dieser Einstellung wird der Browser dazu angewiesen, bei jedem Request die volle URL im Referer Header mitzusenden.
1841 |
Weitere Informationen:
1842 | https://siwecos.de/wiki/
Strict-Transport-Security stellt sicher, dass die Webseite für die definierte Zeit lediglich über HTTPS aufgerufen werden kann.
1847 |1848 |
Die Angabe "max-age" ist für eine korrekte Funktion Pflicht.
1849 |1850 |
Weitere Informationen:
1851 | https://siwecos.de/wiki/
1852 |
Die Content-Security-Policy definiert, aus welchen Quellen verschiedene Anfragen/Ressourcen, welche das Injizieren und Ausführen von evtl. bösartigen Befehlen, eingebunden werden dürfen.
1857 |
1858 | Die default-Angabe sollte dabei immer gesetzt werden. Alle weiteren Angaben ändern die default-Angabe entsprechend ab.
1860 |
Eigenschaft "default-src"
1861 | Voreinstellung für alle Richtlinien.
Eigenschaft "img-src"
1863 | Definiert erlaubte Quellen für Bilder.
Eigenschaft "media-src"
1865 | Definiert erlaubte Quellen für Audio und Video.
Eigenschaft "font-src"
1867 | Definiert erlaubte Quellen für Schriftarten.
Eigenschaft "script-src"
1869 | Definiert erlaubte Quellen für JavaScript.
Eigenschaft "style-src"
1871 | Definiert erlaubte Quellen für Stylesheets.
Eigenschaft "object-src"
1873 | Definiert erlaubte Quellen für Plugins (z.B. object, embed, applet).
Eigenschaft "form-action"
1875 | Definiert erlaubte Ziele für HTML Formulare.
Eigenschaft "frame-src"
1877 | Definiert erlaubte Quellen für Frame-Inhalte.
Eigenschaft "frame-ancestors"
1879 | Definiert erlaubte Quellen die eingebettete Inhalte haben dürfen (z.B. frame, iframe).
1881 |
Wert "https:"
1882 | Erlaubt das Laden von Ressourcen ausschließlich mit HTTPS von jeglicher Domain.
Wert"data:"
1884 | Erlaubt das Laden von Ressourcen über data:-Definitionen.
Wert"blob:"
1886 | Erlaubt das Laden von Ressourcen über blob:-Definitionen.
Wert"self"
1888 | Erlaubt das Laden von Ressourcen von dem selben Ursprung.
Wert"unsafe-inline"
1890 | Erlaubt die Benutzung von inline-Code wie z. B. style-Attribute oder onClick.
Wert"unsafe-eval"
1892 | Erlaubt unsichere dynamische Code-Auswertung wie z.B. die JavaScript-Methode eval().
Wert"unsafe-hashes"
1894 | Erlaubt Scripte in Event-Handlern.
Wert"none"
1896 | Verhindert das Laden von Ressourcen von egal welcher Quelle.
1898 |
Weitere Informationen:
1899 | https://siwecos.de/wiki/
1900 |
1901 | https://wiki.selfhtml.org/wiki/
1902 |
1903 |
Mit der Permissions-Policy (früher Feature-Policy) kann dem Webbrowser mitgeteilt werden, auf welche Browser- bzw. Systemfeatures zugegriffen werden kann.
1908 | Werden keine Features/Permissions definiert, so ist der Zugriff auf entsprechende Features immer möglich.
1910 |
Wert"self"
1911 | Die entsprechende Eigenschaft ist für die Webseite und alle eingebetteten Ressourcen mit der selben Herkunft verwendbar.
Wert"none"
1913 | Die entsprechende Eigenschaft ist deaktiviert und damit weder von der Webseite noch eingebundenen Ressourcen verwendbar.
1914 |
1916 |
Weitere Informationen:
1917 | https://www.codingblatt.de/
1918 |