Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing hostname when publishing via API #144

Merged
merged 2 commits into from Aug 7, 2019

Conversation

@thebaer
Copy link
Member

commented Jul 22, 2019

This fixes a bug that occurred only when publishing via API and authenticating via token (rather than cookie). I noticed this while testing the new wf-cli.

Previously, the instance's hostname wouldn't be added to the Collection that got passed around after retrieving the owned post, meaning an incomplete URL was returned in the API response, and federation failed due to the missing host (and thus failed key lookup).

Fix missing hostname when publishing via API
This fixes a bug that occurred only when publishing via API and
authenticating via token (rather than cookie).

Previously, the instance's hostname wouldn't be added to the Collection
that got passed around after retrieving the owned post, meaning an
incomplete URL was returned in the API response, and federation failed due
to the missing host.

@thebaer thebaer added this to the 0.11 milestone Jul 22, 2019

Log missing hostName in Collection.RedirectingCanonicalURL
This is the crucial part where the hostName is needed for federation and
API clients. This change at least lets us know when we mess up like this
so the issue is easier to catch in the future.
@thebaer

This comment has been minimized.

Copy link
Member Author

commented Jul 29, 2019

Leaving this open for a bit longer while we test wf-cli.

@thebaer

This comment has been minimized.

Copy link
Member Author

commented Aug 7, 2019

Good to go now.

@thebaer thebaer merged commit ef4a5b2 into develop Aug 7, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@thebaer thebaer deleted the fix-api-missing-hostname branch Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.