GithubHelp home page GithubHelp logo

Comments (10)

LitoMore avatar LitoMore commented on May 22, 2024 1

OK, let me solve this.

from flat.

stale avatar stale commented on May 22, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from flat.

BlackHole1 avatar BlackHole1 commented on May 22, 2024

INVITE_BASEURL => WEB_DOMAIN

from flat.

LitoMore avatar LitoMore commented on May 22, 2024

Not sure we support https://example.com/SUB_DIRECTORY/replay/ROOM_TYPE/ROOM_UUID/OWNER_UUID/ kind of link or not.

If we want to support this kind of URL, we should not name it to the domain. base_url is better.

BTW, I noticed we already have the constant FLAT_WEB_DOMAIN in https://github.com/netless-io/flat/blob/main/web/flat-web/src/constants/process.ts.

Use INVITATION_BASE_URL or INVITATION_ENDPOINT instead will be better, IMO.

from flat.

BlackHole1 avatar BlackHole1 commented on May 22, 2024

In #829, our requirement is to open the replay link, so using INVITATION/INVITE is not a good idea in this scenario.

This is because INVITE_BASEURL and FLAT_WEB_DOMAIN have a certain overlap.
Their domain names must be the same

see:

FLAT_SERVER_DOMAIN=flat-api-dev.whiteboard.agora.io
UPDATE_DOMAIN=https://flat-storage.oss-cn-hangzhou.aliyuncs.com/versions
FLAT_WEB_DOMAIN=flat-web-dev.whiteboard.agora.io

cc @LitoMore

from flat.

BlackHole1 avatar BlackHole1 commented on May 22, 2024

Should we only keep FLAT_WEB_DOMAIN? Or, keep FLAT_WEB_DOMAIN and give it a better name, e.g: WEB_DOMAIN?

from flat.

LitoMore avatar LitoMore commented on May 22, 2024

The link https://{DOMAIN} with a protocol (https:) called URL or endpoint.

It's OK to use domain if it does not have the protocol part.

You could try this in Node.js REPL:

> new URL('https://exmaple.com:8080/test/test/file.ext')

The result will be:

URL {
  href: 'https://exmaple.com:8080/test/test/file.ext',
  origin: 'https://exmaple.com:8080',
  protocol: 'https:',
  username: '',
  password: '',
  host: 'exmaple.com:8080',
  hostname: 'exmaple.com',
  port: '8080',
  pathname: '/test/test/file.ext',
  search: '',
  searchParams: URLSearchParams {},
  hash: ''
}

The domain and the hostname are the same thing. Hope this helps you understand the URL.

from flat.

BlackHole1 avatar BlackHole1 commented on May 22, 2024

Thanks for the correction, that might be better called FLAT_WEB_ORIGIN / FLAT_WEB_URL / FLAT_WEB_BASE_URL?

from flat.

LitoMore avatar LitoMore commented on May 22, 2024

The WEB_URL sounds like a full URL. Origin is only used for the HTTP regions, it's not a good choice for URL naming.

FALT_WEB_BASE_URL looks good.

from flat.

BlackHole1 avatar BlackHole1 commented on May 22, 2024

Good. Would anyone like to try and submit a PR for this issue? @netless-io/developers

from flat.

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.