etesync / server

The Etebase server (so you can run your own)
https://www.etesync.com
GNU Affero General Public License v3.0
1.54k stars 75 forks source link

still exist "wrong host name" error when I login in web client, use the latest package #105

Closed aixiaofei closed 3 years ago

aixiaofei commented 3 years ago

I login in web client based on the derect link (not use the nginx), but still got the "wrong host name" image

this is my etesync server config: image

tasn commented 3 years ago

We require setting a specific host not in debug mode, so set allowed_host = "127.0.0.1" or potentially including the port. I don't remember which it is, try whichever works.

I'm closing it as it's solve, let me know if it isn't.

aixiaofei commented 3 years ago

Thank u for you response, I have added the specific domain, but still have the issue image

issue: ba68effd0b09d34f84795a93e8f5ca8

if with the port, still got the error "Bas Requst (400)", wo I think need't the port.

but I can login in apps.

tasn commented 3 years ago

Add the port number to allowed host

aixiaofei commented 3 years ago

ok, Thank u, and I have added the port to allowed host, but got another issue: 4969abcb7fc8a9bd4c49f8e597488d0

image

I don't know why....

tasn commented 3 years ago

It' because you set it wrong, it should be:

[allowed_hosts]
allowed_host1 = xiaofei.online:64
allowed_host2 = 172.23.0.1:3735
aixiaofei commented 3 years ago

Thank u for your response I have modified the configuration file image

but still Bad request image

aixiaofei commented 3 years ago

hello, I found the issue: you will split the host in configuration file, so host_from_request will be host:port, but the validated_data.host always be host, so I think u need't to split or split both the validated_data.host and the host_from_request.

file: https://github.com/etesync/server/blob/master/etebase_fastapi/routers/authentication.py image