1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-09-03 01:34:23 +02:00

Compare commits

...

2 commits

3 changed files with 9 additions and 7 deletions

View file

@ -31,4 +31,5 @@ services:
- "8081:80"
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: ${PROJECT_DB_ROOT_PASSWORD}
MYSQL_ROOT_PASSWORD: ${PROJECT_DB_ROOT_PASSWORD}
UPLOAD_LIMIT: 300M

View file

@ -1,6 +1,3 @@
# To resolve the issue with "Your connection to this site is not secure" message
Header set Content-Security-Policy: upgrade-insecure-requests env=HTTPS
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^view/([0-9]+)/([0-9]+)/?$ router.php?view=word&dict=$1&word=$2 [NC,L] # Handle word ids.

View file

@ -3,9 +3,13 @@ class Response {
private static function defaultHeaders () {
header('Access-Control-Allow-Origin: *');
header('Expires: Sun, 01 Nov 2015 22:46:51 GMT');
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
if (strpos($_SERVER['SERVER_NAME'], 'localhost') !== false) {
# To resolve the issue with "Your connection to this site is not secure" message
header('Content-Security-Policy: upgrade-insecure-requests env=HTTPS');
}
}
public static function json ($data, $http_code = 200) {