GithubHelp home page GithubHelp logo

Comments (10)

gamersekofy avatar gamersekofy commented on August 23, 2024 1

Experiencing the same issue here. Behavior is persistent across Firefox Nightly 125.0a1 (2024-03-02) and Microsoft Edge 123.0.2420.10 on Windows 11, and Samsung Internet v23.0.1.1 on a Tab S7+ running One UI 5.1. Affine looks gorgeous and I would love to use it as an Obsidian replacement!

from affine.

darkskygit avatar darkskygit commented on August 23, 2024 1

AFFiNE uses the websocket protocol to sync data with the cloud. Please refer to nginx's official blog or other articles to configure websocket support for your nginx: https://www.nginx.com/blog/websocket-nginx/

from affine.

NeoHuncho avatar NeoHuncho commented on August 23, 2024 1

For anybody using nginx proxy manager and having the same issue:

you just need to edit your proxy host and enable websockets on the details tab (see image)
Screenshot 2024-03-04 at 14 20 06

from affine.

darkskygit avatar darkskygit commented on August 23, 2024 1

Thanks for the answer and suggestion @darkskygit ! Maybe it could be interesting to add a footnote on web sockets on the self-hosting guide. I can open a PR if needed :)

the document in repo is outdated, now we have a internal affine workspace that is rewriting related documents
once we complete the relevant work, we will publish it on our social accounts

from affine.

gamersekofy avatar gamersekofy commented on August 23, 2024 1

Thanks everyone, enabling websocket support worked! For anyone in the future, here's what the block for affine looks like in my nginx conf file:

server {
    server_name affine.your.domain; 

    location / {
        proxy_pass http://localhost:3010; 
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade; 
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

  <auto-generated certbot SSL stuff here>
}

from affine.

NeoHuncho avatar NeoHuncho commented on August 23, 2024

Okay, thanks for the answer, I will have a look :)

from affine.

darkskygit avatar darkskygit commented on August 23, 2024

If you're just starting to configure your server, you might also consider caddy, which has https and websocket support out of the box: https://caddyserver.com/docs/

If you just want to access the services on your server from anywhere, you can also consider tailscale or zerotier, which allow you to connect directly to your server in an encrypted manner through a fixed IP or private domain name at any network, and do not require purchasing a domain name and configuration https

from affine.

NeoHuncho avatar NeoHuncho commented on August 23, 2024

Thanks for the answer and suggestion @darkskygit ! Maybe it could be interesting to add a footnote on web sockets on the self-hosting guide. I can open a PR if needed :)

from affine.

affine-issue-bot avatar affine-issue-bot commented on August 23, 2024

Issue Status: ✅ Answered

✅ Answered

The issue actually turned out to be a question or a misunderstanding, and it has been answered or resolved.

This is an automatic reply by the bot.

from affine.

Tatametheus avatar Tatametheus commented on August 23, 2024

@gamersekofy Hi, I'm using nginx proxy manager too and I have the same configs as yours. But, I got cors error. Did you see it before?
image

Access to font at 'https://cdn.affine.pro/fonts/Inter-Light-BETA.woff' from origin 'http:/xxxxxxx:3010' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

from affine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.