V 1.0.6 beoanswer
Buttons abgesagt/verschobe werden nun auch aktiviert beim Klick
This commit is contained in:
@@ -17,6 +17,20 @@ server {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
# Serve beoanswer frontend build output from dist
|
||||
location = /beoanswer/ {
|
||||
try_files /beoanswer/dist/index.html =404;
|
||||
}
|
||||
|
||||
location /beoanswer/assets/ {
|
||||
alias /var/www/html/beoanswer/dist/assets/;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location = /beoanswer/anleitung.html {
|
||||
try_files /beoanswer/dist/anleitung.html =404;
|
||||
}
|
||||
|
||||
# Specify the details of favicon.ico
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ $allowedOrigins = [
|
||||
'https://ihre-produktions-domain.de' // Ersetzen Sie durch Ihre echte Domain
|
||||
];
|
||||
|
||||
$origin = $_SERVER['HTTP_ORIGIN'] ?? '';
|
||||
$origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '';
|
||||
if (in_array($origin, $allowedOrigins)) {
|
||||
header("Access-Control-Allow-Origin: $origin");
|
||||
} else {
|
||||
@@ -41,16 +41,24 @@ $backendUrl = 'https://sternwarte-welzheim.de/intern/sofue/php/sofueDB.php';
|
||||
|
||||
// Credentials sicher laden - verschiedene Optionen:
|
||||
// Option 1: Aus Environment Variables (empfohlen)
|
||||
$username = getenv('SOFUE_USERNAME') ?: $_ENV['SOFUE_USERNAME'] ?? null;
|
||||
$password = getenv('SOFUE_PASSWORD') ?: $_ENV['SOFUE_PASSWORD'] ?? null;
|
||||
$username = getenv('SOFUE_USERNAME');
|
||||
if ($username === false || $username === '') {
|
||||
$username = isset($_ENV['SOFUE_USERNAME']) ? $_ENV['SOFUE_USERNAME'] : null;
|
||||
}
|
||||
|
||||
$password = getenv('SOFUE_PASSWORD');
|
||||
if ($password === false || $password === '') {
|
||||
$password = isset($_ENV['SOFUE_PASSWORD']) ? $_ENV['SOFUE_PASSWORD'] : null;
|
||||
}
|
||||
|
||||
// Option 2: Aus separater Config-Datei (Fallback)
|
||||
if (!$username || !$password) {
|
||||
$configFile = __DIR__ . '/cors-config.php';
|
||||
if (file_exists($configFile)) {
|
||||
include $configFile;
|
||||
// cors-config.php sollte enthalten:
|
||||
// <?php $username = 'beogruppe'; $password = 'ArktUhr'; ?>
|
||||
// cors-config.php sollte enthalten:
|
||||
// $username = 'beogruppe';
|
||||
// $password = 'ArktUhr';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "beoanswer_react",
|
||||
"private": true,
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -12,9 +12,9 @@ export default function FandStattVer({left, right, title, onNext, radioName = "f
|
||||
const handleRadioChange = (e) => {
|
||||
const value = e.target.value
|
||||
updateFormData(fieldName, value)
|
||||
setAuswahl(value)
|
||||
setbackButton(true)
|
||||
if(radioName !== 'abgesagt') {
|
||||
setAuswahl(value)
|
||||
onNext(value)
|
||||
} else {
|
||||
onNext()
|
||||
|
||||
Reference in New Issue
Block a user