2
This commit is contained in:
@@ -12,6 +12,7 @@ Options -Indexes
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
AddOutputFilterByType DEFLATE application/json
|
||||
</IfModule>
|
||||
|
||||
# Set caching headers
|
||||
@@ -36,31 +37,6 @@ Options -Indexes
|
||||
Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
||||
</IfModule>
|
||||
|
||||
# PHP settings (if needed)
|
||||
<IfModule mod_php7.c>
|
||||
php_flag display_errors Off
|
||||
php_value error_reporting E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_php8.c>
|
||||
php_flag display_errors Off
|
||||
php_value error_reporting E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
</IfModule>
|
||||
|
||||
# Handle PHP files if mod_php is not available
|
||||
<Files "*.php">
|
||||
SetHandler application/x-httpd-php
|
||||
</Files>
|
||||
|
||||
# Alternative PHP handler for different server configurations
|
||||
<IfModule mod_fcgid.c>
|
||||
AddHandler fcgid-script .php
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_cgi.c>
|
||||
AddHandler cgi-script .php
|
||||
</IfModule>
|
||||
|
||||
# Force HTTPS (uncomment if you have SSL certificate)
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{HTTPS} off
|
||||
|
||||
@@ -564,7 +564,7 @@
|
||||
async function testPHP() {
|
||||
logDebug('Testing PHP & Webhook...');
|
||||
try {
|
||||
const response = await fetch('scripts/add/test.php');
|
||||
const response = await fetch('/scripts/add/test.php');
|
||||
if (response.ok) {
|
||||
const result = await response.json();
|
||||
logDebug(`PHP: ${result.tests?.php?.version || 'OK'}`);
|
||||
@@ -588,7 +588,7 @@
|
||||
async function testForm() {
|
||||
logDebug('Testing contact form...');
|
||||
try {
|
||||
const response = await fetch('scripts/add/send.php', {
|
||||
const response = await fetch('/scripts/add/send.php', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
2
Profice WebSite/phpinfo.php
Normal file
2
Profice WebSite/phpinfo.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
phpinfo();
|
||||
@@ -145,7 +145,7 @@ class KIChat {
|
||||
this.isTyping = true;
|
||||
|
||||
try {
|
||||
const response = await fetch('scripts/add/send.php', {
|
||||
const response = await fetch('/scripts/add/send.php', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
const API_ENDPOINT = 'scripts/add/send.php';
|
||||
// Use absolute path from site root
|
||||
const API_ENDPOINT = '/scripts/add/send.php';
|
||||
const isLocalFile = window.location.protocol === 'file:';
|
||||
|
||||
// ==========================================
|
||||
|
||||
Reference in New Issue
Block a user