File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
administrator/components/com_config/src/Model Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -745,10 +745,10 @@ public function save($data)
745745 $ config = new Registry ($ data );
746746
747747 // Overwrite webservices cors settings
748- $ app ->set ('cors ' , $ data ['cors ' ]);
749- $ app ->set ('cors_allow_origin ' , $ data ['cors_allow_origin ' ]);
750- $ app ->set ('cors_allow_headers ' , $ data ['cors_allow_headers ' ]);
751- $ app ->set ('cors_allow_methods ' , $ data ['cors_allow_methods ' ]);
748+ $ app ->set ('cors ' , $ data ['cors ' ] ?? 0 );
749+ $ app ->set ('cors_allow_origin ' , $ data ['cors_allow_origin ' ] ?? ' * ' );
750+ $ app ->set ('cors_allow_headers ' , $ data ['cors_allow_headers ' ] ?? ' Content-Type,X-Joomla-Token ' );
751+ $ app ->set ('cors_allow_methods ' , $ data ['cors_allow_methods ' ] ?? '' );
752752
753753 // Clear cache of com_config component.
754754 $ this ->cleanCache ('_system ' );
You can’t perform that action at this time.
0 commit comments