Skip to content

Commit

Permalink
Feature/mod rewrite (#516)
Browse files Browse the repository at this point in the history
* rewrite all

* Images REK-51

* Images REK-51

---------

Co-authored-by: Mateusz Wojczal <[email protected]>
  • Loading branch information
qunabu and Mateusz Wojczal authored Nov 27, 2024
1 parent 75c11b2 commit 9f68edc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/php/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// check variables first

$domains = [];
$token = '<script><!-- inject env variables --></script>';
$token = '<!-- inject env variables -->';

if (isset($_ENV['MULTI_DOMAINS'])) {
foreach (explode(",", $_ENV['MULTI_DOMAINS']) as $domain) {
Expand All @@ -29,7 +29,7 @@
if (isset($setup)) {
foreach ($setup as $key => $value) {
if (str_starts_with($key, 'VITE_APP_') || str_starts_with($key, 'REACT_APP_')) {
$content = str_replace($token, "\n" . '<script>window.' . $key . '="' . $value . '"</script>' . $token, $content);
$content = str_replace($token, "\n" . 'window.' . $key . '="' . $value . '"' . $token, $content);
}
}
}
Expand Down

0 comments on commit 9f68edc

Please sign in to comment.