-
-
Notifications
You must be signed in to change notification settings - Fork 233
feat: add option to run tinyauth on a top-level domain #710
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
base: main
Are you sure you want to change the base?
Changes from all commits
d90e3d6
44a7cbf
4c0181c
4077bac
b06b601
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,15 @@ func GetCookieDomain(u string) (string, error) { | |
| return domain, nil | ||
| } | ||
|
|
||
| func GetStandaloneCookieDomain(u string) (string, error) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This probably needs tests to cover the scenarios it may be used in.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean do we really need testing? It's just URL parse and the stdlib is tested so what should we test? If it parses
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my take is that if it's a straightforward test to write, it's worth having. Especially if it's edge case config. Better to catch a regression in a test that have a user report their tinyauth is broken. Your call, though. |
||
| parsed, err := url.Parse(u) | ||
| if err != nil { | ||
| return "", err | ||
| } | ||
|
|
||
| return parsed.Hostname(), nil | ||
| } | ||
|
|
||
| func ParseFileToLine(content string) string { | ||
| lines := strings.Split(content, "\n") | ||
| users := make([]string, 0) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.