Comments (12)
from mongodb-php-gui.
I do not have a good overview, but what is crucial is that the controller redirect should use this path for the internal redirects.
Controller::redirectTo()
method use MPG_BASE_URL
constant which is based on $_SERVER['REQUEST_URI']
variable. See [1]. So I don't understand why redirect fails. Could it be related to reverse proxy behavior?
from mongodb-php-gui.
instead of using full paths and server names. just 7se realative url. dont use / anywhere at the start but just index.php or subdirectory names. if i find time ill look at coding a pr
from mongodb-php-gui.
I've done some testing. I've realized that the problem is not the context, but the HTTP_HOST.
When this parameter is missing from the ngnix reverse_proxy then the host is the local hostname not the reverse_proxy host name:
proxy_set_header Host $http_host;
Since in our environment pushing through a change like that is time consuming, I've did a workaround, which is not the nicest, but works :)
tonkolviktor@af4e437
For the main product probably @patrickdk77's point is the best.
from mongodb-php-gui.
@tonkolviktor You don't need to move files to api/mongo-ui
folder anymore?
Could you please do a dirty test?
Replace this line:
define('MPG_BASE_URL', $baseUrl);
by this line:
define('MPG_BASE_URL', $serverPath);
Maybe we can omit the host and use MPG_SERVER_PATH
instead of MPG_BASE_URL
everywhere in code.
PS: I think it's safer to keep absolute paths.
from mongodb-php-gui.
@SamuelTS thanks I did.
Hm, at least the static files I still have to move, right?
Maybe they need an extra route or something, but for me they fail:
HTML:
<script src="/api/mongo-ui/static/js/mpg.login.js"></script>
Log:
GET /api/mongo-ui/static/js/mpg.login.js - No such file or directory
from mongodb-php-gui.
Additionally I'm getting now a session problems, but this could be because one of my changes.
PHPSESSID cookie is set and sent.
from mongodb-php-gui.
Hm, at least the static files I still have to move, right?
Yes. But it wasn't required previously? I'm lost 😆
from mongodb-php-gui.
Additionally I'm getting now a session problems, but this could be because one of my changes.
You should not debug with print
[1]. This could cause issues. I think error_log
is a better option.
from mongodb-php-gui.
@tonkolviktor I've released a version. Routing code is cleaner. This should not resolve your issue, but I encourage you to upgrade anyway.
from mongodb-php-gui.
@SamuelTS thanks!
A summary from my side is that the reverse proxy setup works.
I cannot fix the session problem that I'm having, which means unfortunately I cannot continue. However that must be something in my environment.
Thanks for the quick reply and action to make the reverse proxy work, hopefully it will be useful for someone else. From my side feel free to close the issue.
ps.: I wanted to clear one point before a deployment in a separate issue, but unfortunately that will not be relevant for me anymore. Still here it is: I could not find License information only [1], I would not know how to understand this. It would be nice to clarify what can be done with your code, like: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/licensing-a-repository
[1]
Copyright
© 2021 Samuel Tallet
from mongodb-php-gui.
@tonkolviktor You're welcome. This project is licensed under GPL v3.
from mongodb-php-gui.
Related Issues (20)
- Secure login with hCatpcha HOT 1
- Add reference to the GitHub repository/issues HOT 1
- Quick edit full document entry HOT 3
- Import from CSV / Export to CSV HOT 1
- Login for user having only database specific roles HOT 1
- Deny access to private files to improve security HOT 1
- Provide tagged Docker image HOT 5
- Not working behind ingress controller HOT 2
- Various feature requests for navigation and search
- Database visualization gets really slow with huge dataset HOT 1
- Edit document null attribute doesn't work
- Support for ARM64 architecture HOT 4
- Login page: store multiple target connection URIs
- Login page: do not retain credentials
- How to query an ObjectId field not named _id? HOT 3
- Accessing through subdirectory (reverse proxy)
- No input file specified.
- URI login problem HOT 4
- How to deploy on kubernetes
- Optimization of data visualization
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 mongodb-php-gui.