Comments (6)
@exception0x876 - Thanks for posting this. It fixes the error being thrown running tngrok.
I have found however that, if caching is enabled, JS will load under the local host instead of the ngrok host.
Did you run into this?
from totara-docker-dev.
@exception0x876 - Thanks for posting this. It fixes the error being thrown running tngrok.
I have found however that, if caching is enabled, JS will load under the local host instead of the ngrok host.
Did you run into this?
I haven't tried it with caching enabled. Would you mind posting the relevant cache settings from your config.php?
from totara-docker-dev.
I had to also set a few other config options in config.php to make everything work properly and have the generated URLs etc be correct:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
// ngrok 3.x
$CFG->wwwroot = $_SERVER['HTTP_X_FORWARDED_PROTO'] . '://' . $_SERVER['HTTP_X_FORWARDED_HOST'];
$CFG->reverseproxy = true;
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$CFG->sslproxy = true;
}
}
(was a quick fix, so I just added this block after the existing checks)
Will make a PR to add something like this to the default config.php.
from totara-docker-dev.
With the workaround explained in the description
"Update config.php and change $_SERVER['HTTP_X_ORIGINAL_HOST'] to $_SERVER['HTTP_X_FORWARDED_HOST']"
it worked for me. Created a PR.
@scq did the workaround not work out of the box for you? What happens without the changes you mention?
from totara-docker-dev.
@derschatta Ah, I wasn't using tngrok and was passing some different configuration flags. With the same flags as tngrok, that change does work for me.
from totara-docker-dev.
fixed in #225
from totara-docker-dev.
Related Issues (20)
- Update PHP 8.1 image to latest version (still on beta)
- Integrated docker-dev environment for the machine learning service
- Remote server rewrite rules accidentally blocking valid directories for apache HOT 3
- Apache server drops authorization header when served over https HOT 1
- Config.php default settings have poor performance HOT 3
- Selenium on M1 HOT 4
- Two different default versions of postgres versions HOT 2
- Add additional locales to PHP containers
- egrep is deprecated in the 3.8 release of gnu-grep HOT 1
- Expose Machine Learning Service config options to .env file HOT 1
- Mysql 5.7 on M1 HOT 2
- Arm support in Docker images HOT 6
- Restrict access to some directories and files create continues error in SCORM activities HOT 2
- Update selenium & chrome images HOT 1
- Add support for redis with read replication HOT 1
- Error 'multiarch-support is not installed' during php container build HOT 1
- Outdated database credential docs HOT 1
- New DB docker images HOT 1
- Ngrok have an `ngrok.app` domain
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from totara-docker-dev.