Remove 8080 port requirement + Improved support for Apache setups

This commit is contained in:
Bofh 2022-12-17 21:54:05 +01:00
parent 1cff51370f
commit 197a4273e8
2 changed files with 10 additions and 4 deletions

View File

@ -3,7 +3,3 @@ FROM php:8.0-apache
RUN apt-get update && apt-get install libpq-dev -y
RUN docker-php-ext-install pgsql
RUN pecl install redis && docker-php-ext-enable redis
RUN echo 'Listen 8080' > /etc/apache2/ports.conf
EXPOSE 8080

View File

@ -363,6 +363,16 @@ const http = {
payload = payload || null;
callbk = callbk || null;
// Apache servers work like shit on redirects
// this code is needed to avoid 301 on API,
/// which makes POST and other request fail.
path = path.trim();
if (path.indexOf('?') !== -1)
path = path.replace(/(?<=[^\/])\?/, '/?');
else if (!path.endsWith('/') &&
!(path.endsWith('.php') || path.endsWith('.html')))
path += '/';
//console.log(path); printstack();
const httpid = uuidv4();
const httpdiv = document.getElementById('http');