Comments (3)
I found what is the error.
In Fider.settings.baseURL
I have the wrong protocol, http
instead of https
(http://feedback.alcalyn.app/
instead of https://feedback.alcalyn.app/
).
It leads to the following error:
DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'http://feedback.alcalyn.app/?view=recent' cannot be created in a document with origin
I installed Fider using Docker, and behind nginx with let's encrypt. When I check logs, docker receive requests without https
:
INFO [2023-12-13T17:23:46Z] [WEB] GET http://feedback.alcalyn.app/ started
INFO [2023-12-13T17:23:46Z] [WEB] GET http://feedback.alcalyn.app/ finished with 200 in 130ms (committed)
INFO [2023-12-13T17:23:46Z] [WEB] GET http://feedback.alcalyn.app/_api/notifications/unread/total started
INFO [2023-12-13T17:23:46Z] [WEB] GET http://feedback.alcalyn.app/_api/notifications/unread/total finished with 200 in 25ms (committed)
I set the good BASE_URL
in my docker-compose.yml
:
app:
environment:
# Public Host Name
BASE_URL: https://feedback.alcalyn.app
and restarted it, still the error.
I checked the json inside document.getElementById("server-data")
and the base url is without https.
The server is sending the wrong base url (assetsURL is well set):
"settings": {
"assetsURL": "https://feedback.alcalyn.app",
"baseURL": "http://feedback.alcalyn.app",
...
I think the server is either sending this baseUrl from a cached variable (probably I missed the https and fixed it later), or is building the baseUrl from RequestContext, which is not possible when behind nginx, because it misses the https. The server should use either BASE_URL from env, or build it on front side from current url.
In the docker container, the env var is also well set:
root@19af12bc51c9:/app# echo $BASE_URL
https://feedback.alcalyn.app
I looked in the go code, but I'm not fluent with this language!
from fider.
I looked again this.
I could made it work by adding this in my nginx config:
server {
listen 443;
server_name feedback.alcalyn.app;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://0.0.0.0:....;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
ssl_certificate ...
ssl_certificate_key ...
}
This way, fider app now have "https" in its web context.
from fider.
Hi, even if I force X-Forwarded-Proto
header to.https
, the search is still crashing, with http://mydomain.com
as Take me back URL.
The X-Forwarded-Host
header seems to work. Do you have any idea on it?
from fider.
Related Issues (20)
- [BUG] SMTP SSL does not work HOT 1
- Using local sendmail HOT 1
- Azure OAuth config env variables HOT 1
- [BUG] ERR_HTTP2_PROTOCOL_ERROR on callback URL HOT 1
- [BUG] Avatar is not loaded for username with special chars
- [BUG] open ssr.js: no such file or directory
- [BUG] SMTP open relay HOT 3
- [BUG] Empty Deletion Reason Does Not Trigger Delete Webhook
- [BUG] Fresh docker setup does not display a sign-up page although everything seems fine HOT 9
- [BUG] X cannot be used as a JSX component HOT 4
- Account is Pending Activation HOT 1
- Custom OAuth guidance
- Custom Oauth redirect_uri page not found HOT 3
- Black White Screen on Sign-Up Page after installing with Docker HOT 4
- Is Fider still maintained? HOT 2
- Packaging Fider for Nix - I have some questions HOT 1
- [HELP] Help with self-hosted Nginx reverse proxy HOT 1
- Problem with self hosted user stuck in pending activation state HOT 4
- Instructions for self-hosted deploy with docker are outdated HOT 1
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 fider.