Remove 8080 port requirement + Improved support for Apache setups
This commit is contained in:
parent
1cff51370f
commit
197a4273e8
|
@ -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
|
||||
|
|
10
js/base.php
10
js/base.php
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue