Skip to content

Conversation

@tpoliaw
Copy link
Contributor

@tpoliaw tpoliaw commented Dec 10, 2025

If the service is not hosted at the root of a domain, the links to the
graphql and graphiql endpoints cannot be absolute.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.80%. Comparing base (b6e2749) to head (4599a02).

Files with missing lines Patch % Lines
src/main.rs 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
- Coverage   49.27%   48.80%   -0.48%     
==========================================
  Files          13       13              
  Lines         621      627       +6     
==========================================
  Hits          306      306              
- Misses        315      321       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tpoliaw tpoliaw linked an issue Dec 10, 2025 that may be closed by this pull request
@tpoliaw tpoliaw requested a review from abbiemery December 15, 2025 11:30
@tpoliaw tpoliaw requested a review from a team as a code owner January 9, 2026 13:38
If the service is not hosted at the root of a domain, the links to the
graphql and graphiql endpoints cannot be absolute.
Bit of an overkill for two urls
@ZohebShaikh
Copy link
Contributor

ZohebShaikh commented Jan 9, 2026

I have checked that it does not working for localhost case as it tries to redirect me to "127.0.0.1/" (which does mean localhost)

You can try this by doing docker run -p 3000:3000 ghcr.io/zohebshaikh/glazed:0.1.3 and then naviagte to localhost:3000

You can also check at https://p46-blueapi.diamond.ac.uk/glazed/

@tpoliaw
Copy link
Contributor Author

tpoliaw commented Jan 9, 2026

The problem is that by default it binds to 0.0.0.0 (all interfaces) and if you don't provide a public address it re-uses the bind address. Is there ever a case where we don't want to be binding to 0.0.0.0?

Potential fixes

  • Make public_address a required config field
    • and replace the bind_address with port?
  • Use relative links if public_address is not provided
  • Make localhost:3000 the default bind address and require it to be set when using in production?

Oddly, if I try to run with this PR but no config, clicking the link gives me an error can’t establish a connection to the server at 0.0.0.0:3000 but the fills the address bar with 127.0.0.1:3000/graphiql so reloading the page works. Might just be firefox though and it still needs fixing.

@tpoliaw
Copy link
Contributor Author

tpoliaw commented Jan 9, 2026

You can also check at https://p46-blueapi.diamond.ac.uk/glazed/

I don't think the p46 version has this change (or if it does, the public address needs a trailing /)

@tpoliaw
Copy link
Contributor Author

tpoliaw commented Jan 9, 2026

We need the public_address to build the download links as well so I'm erring towards changing the required config to port and public_address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix links in 404 page

4 participants