create-prisma-php-app 1.8.8 → 1.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.htaccess +9 -18
- package/dist/bootstrap.php +3 -3
- package/dist/index.js +1 -748
- package/dist/prisma-client-php/index.enc +1 -1
- package/package.json +1 -1
package/dist/.htaccess
CHANGED
|
@@ -1,27 +1,18 @@
|
|
|
1
|
+
# Turn on rewrite engine
|
|
1
2
|
RewriteEngine On
|
|
2
3
|
|
|
3
|
-
#
|
|
4
|
-
# RewriteRule ^favicon\.ico$ src/app/favicon.ico [L,NC]
|
|
5
|
-
|
|
6
|
-
# Redirect requests for static files to their correct path
|
|
7
|
-
# RewriteRule ^(css|js|images|assets)/(.*)$ src/app/$1/$2 [L,NC]
|
|
8
|
-
|
|
9
|
-
# Redirect all other requests to layout.php, if they are not directly accessing a file or directory
|
|
10
|
-
# RewriteCond %{REQUEST_FILENAME} !-f
|
|
11
|
-
# RewriteCond %{REQUEST_FILENAME} !-d
|
|
12
|
-
RewriteRule !^src/app/ src/app/layout.php [QSA,L]
|
|
13
|
-
|
|
14
|
-
# Deny access to .env file
|
|
4
|
+
# Deny access to .env file for security
|
|
15
5
|
<Files .env>
|
|
16
6
|
Order allow,deny
|
|
17
7
|
Deny from all
|
|
18
8
|
</Files>
|
|
19
9
|
|
|
20
10
|
# Allow cross-origin requests (CORS) for all routes
|
|
21
|
-
# This is only necessary if you are using the API from a different domain
|
|
22
|
-
# You can remove this section if you are only using the API from the same domain
|
|
23
11
|
<IfModule mod_headers.c>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</IfModule>
|
|
12
|
+
Header set Access-Control-Allow-Origin "*"
|
|
13
|
+
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
|
14
|
+
Header set Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With"
|
|
15
|
+
</IfModule>
|
|
16
|
+
|
|
17
|
+
# Redirect all non-file and non-directory requests not starting with src/app/ to src/app/layout.php
|
|
18
|
+
RewriteRule !^src/app/ src/app/layout.php [QSA,L]
|
package/dist/bootstrap.php
CHANGED
|
@@ -59,7 +59,7 @@ function determineContentToInclude()
|
|
|
59
59
|
|
|
60
60
|
function checkForDuplicateRoutes()
|
|
61
61
|
{
|
|
62
|
-
$routes = json_decode(file_get_contents(SETTINGS_PATH . "/
|
|
62
|
+
$routes = json_decode(file_get_contents(SETTINGS_PATH . "/files-list.json"), true);
|
|
63
63
|
|
|
64
64
|
$normalizedRoutesMap = [];
|
|
65
65
|
foreach ($routes as $route) {
|
|
@@ -101,7 +101,7 @@ function writeRoutes()
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
$jsonData = json_encode($filesList, JSON_PRETTY_PRINT);
|
|
104
|
-
$jsonFileName = SETTINGS_PATH . '/
|
|
104
|
+
$jsonFileName = SETTINGS_PATH . '/files-list.json';
|
|
105
105
|
@file_put_contents($jsonFileName, $jsonData);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -132,7 +132,7 @@ function isGroupIdentifier($segment): bool
|
|
|
132
132
|
|
|
133
133
|
function matchGroupFolder($constructedPath): ?string
|
|
134
134
|
{
|
|
135
|
-
$routes = json_decode(file_get_contents(SETTINGS_PATH . "/
|
|
135
|
+
$routes = json_decode(file_get_contents(SETTINGS_PATH . "/files-list.json"), true);
|
|
136
136
|
$bestMatch = null;
|
|
137
137
|
$normalizedConstructedPath = ltrim(str_replace('\\', '/', $constructedPath), './');
|
|
138
138
|
|