fix local IP for dev, fix broadcast view

This commit is contained in:
Jeff Emmett 2024-12-14 14:12:31 -05:00
parent a9dd23d51b
commit d6ab873ec9
2 changed files with 7 additions and 10 deletions

View File

@ -289,15 +289,12 @@ export const overrides: TLUiOverrides = {
kbd: "alt+b",
readonlyOk: true,
onSelect: () => {
const otherUsers = Array.from(editor.store.allRecords()).filter(
(record) =>
record.typeName === "instance_presence" &&
record.id !== editor.user.getId(),
)
otherUsers.forEach((user) => {
editor.startFollowingUser(user.id)
})
const collaborators = editor.getCollaborators()
collaborators
.filter((user) => user.id !== editor.user.getId())
.forEach((user) => {
editor.startFollowingUser(user.id)
})
},
},
stopBroadcast: {

View File

@ -40,7 +40,7 @@ const { preflight, corsify } = cors({
// For development - check if it's a localhost or local IP
if (
origin.match(
/^http:\/\/(localhost|127\.0\.0\.192\.168\.|169\.254\.|10\.)/,
/^http:\/\/(localhost|127\.0\.0\.1|192\.168\.|169\.254\.|10\.)/,
)
) {
return origin