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

Experiment with worker redirection #606

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

turt2live
Copy link
Member

This is not ready for usage, and makes a ton of assumptions. It's at best a proof of concept.

@turt2live turt2live changed the title Experiment with JWT-based worker redirection Experiment with worker redirection Dec 27, 2024
Copy link

@davidegirardi davidegirardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few comments that we can address early. I didn't touch parts of the code that are not ready, like GetMediaById.

panic(err) // it wouldn't have worked anyways
}
qs := parsedUrl.Query()
qs.Set(key, val)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to url-encode val or does Set() do it for us?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set does this for us

@@ -1,9 +1,58 @@
package _responses

import (
"crypto/hmac"
"crypto/sha256"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for not using sha512 for the HMACs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read "use sha512" as "use sha256" for some reason - let's just use sha512.

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.

2 participants