ssbc / go-ssb-room

Room server implemented in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sign in link has port 3000

nolash opened this issue · comments

commented

No matter what i do with reverse proxy, the sign in link has port 3000.

These are the headers from the initial request:

$ socat TCP4-LISTEN:3000,bind=127.0.1.1,reuseaddr -
GET /assets/favicon/favicon-32x32.png HTTP/1.1
host: ssb.local
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="102"
sec-ch-ua-mobile: ?0
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36
sec-ch-ua-platform: "Linux"
accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
sec-fetch-site: same-origin
sec-fetch-mode: no-cors
sec-fetch-dest: image
referer: https://ssb.local/
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cookie: _gorilla_csrf=MTY2MDMzMDMzNXxJa1I2V1doNVdFOXJXRkpSTDI5bFUxZDROelpzY0hkb1JXcE9OMDFTWlhsMk1UWkpWVlZITVdvdmVUQTlJZ289fLOpbwVBR927YvmMeM5M3X6prqk-JeIyHZXA_VBkKJS-
x-forwarded-host: ssb.local
x-forwarded-proto: https
x-forwarded-for: 127.0.0.1

@nolash 👋

No matter what i do with reverse proxy, the sign in link has port 3000.

Can you explain a bit further what you mean? Which sign in link?

When I choose "sign in with" from manyverse, I get the the following link:

https://room.foo.com/login?ssb-http-auth=1&cid=<key>

Or you mean on the homepage of room.foo.com, the sign-in button? I see:

https://room.foo.com/login

commented

It's this link:

note the hostname ssb.local and the link that added :3000.

BTW I am using a self-signed cert for test setup.

Using git tag v2.0.6 built with -tags dev.

Ah, that's because you're building with -dev then:

// Development instructs url building to happen with http and include the http port
Development bool

Is this a problem? You don't need the proxy passing / cert if you're hacking locally? 🤔

commented

without ssl this happens:

(seemingly regardless of dev tag)

commented

... and regardless whether I run with -https-domain option defined.

@nolash hmmm idk when i followed https://github.com/ssbc/go-ssb-room/blob/master/docs/development.md#development-notes and ran go generate -tags dev ./...; cd cmd/server && go build -tags dev && ./server it Just Worked ™️ without the need for proxying/ssl... maybe go back over those instructions once more?

commented

starting over from development install I get on go generate ...

npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.

added 334 packages, and audited 335 packages in 4m

44 packages are looking for funding
  run `npm fund` for details

16 vulnerabilities (7 moderate, 8 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues, run:
  npm audit fix --force

Run `npm audit` for details.
npm notice 
npm notice New minor version of npm available! 8.17.0 -> 8.18.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.18.0
npm notice Run npm install -g npm@8.18.0 to update!
npm notice 

> css-go-ssb-room@1.0.0 compile-dev
> postcss input.css -o ../assets/style.css

Error: Loading PostCSS Plugin failed: Package subpath './lib/node' is not defined by "exports" in /dev/shm/lashtmp/goo/go-ssb-room/web/styles/node_modules/postcss/package.json

(@/dev/shm/lashtmp/goo/go-ssb-room/web/styles/postcss.config.js)
    at load (/dev/shm/lashtmp/goo/go-ssb-room/web/styles/node_modules/postcss-load-config/src/plugins.js:28:11)
    at /dev/shm/lashtmp/goo/go-ssb-room/web/styles/node_modules/postcss-load-config/src/plugins.js:53:16
    at Array.map (<anonymous>)
    at plugins (/dev/shm/lashtmp/goo/go-ssb-room/web/styles/node_modules/postcss-load-config/src/plugins.js:52:8)
    at processResult (/dev/shm/lashtmp/goo/go-ssb-room/web/styles/node_modules/postcss-load-config/src/index.js:33:14)
    at /dev/shm/lashtmp/goo/go-ssb-room/web/styles/node_modules/postcss-load-config/src/index.js:94:14
    at async Promise.all (index 0)
web/styles/gen_dev.go:6: running "npm": exit status 1
commented

Im a bit puzzled about how much sources/deps seem to be pulled into creating the room, though... ? Am I looking in the wrong place?

I believe you're now in the Node.js twilight zone 🙃 Good Luck ™️

Assuming #318 (comment) resolves, please re-open if not.