GithubHelp home page GithubHelp logo

Comments (9)

EYHN avatar EYHN commented on July 21, 2024

affine desktop client currently does not support selfhost.

Do you mean web?

from affine.

aliuq avatar aliuq commented on July 21, 2024

@EYHN Hello, it's not desktop, it's a self-host. I deployed Affine on Synology, and then penetrated to the external network through the Frp internal network. When accessing the external network to query cloud and other services through /graphql, an error was thrown Forbidden resource

Forbidden resurce is from

async function getCloudWorkspaceList() {
const session = await getSession();
if (!session) {
return [];
}
try {
const { workspaces } = await fetcher({
query: getWorkspacesQuery,
});
const ids = workspaces.map(({ id }) => id);
return ids.map(id => ({
id,
flavour: WorkspaceFlavour.AFFINE_CLOUD,
}));
} catch (err) {
if (err instanceof Array && err[0]?.message === 'Forbidden resource') {
// user not logged in
return [];
}
throw err;
}
}

from affine.

EYHN avatar EYHN commented on July 21, 2024

@aliuq Will it work fine without frp?

from affine.

aliuq avatar aliuq commented on July 21, 2024

@EYHN yeah, if running on localhost, its work

from affine.

EYHN avatar EYHN commented on July 21, 2024

According to the error message, it seems that you are not logged in.

Please check whether the cookie can be correctly passed to the backend server.

from affine.

aliuq avatar aliuq commented on July 21, 2024

@EYHN Frp just forwards the request. I don’t know if ngrok and cloudflare tunnel will produce the same error.

from affine.

vitekburda avatar vitekburda commented on July 21, 2024

For me it does the same with nginx - but only if I add auth_basic
(if I run it without auth_basic, all works fine)

I assume it relates to NestJS Guards?

from affine.

vitekburda avatar vitekburda commented on July 21, 2024

btw the solution for nginx is as follows:

proxy_set_header Authorization "";

🤦

from affine.

aliuq avatar aliuq commented on July 21, 2024

This issue seems to be resolved in the latest version, closed

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.