Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: add URL scheme to example#160

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 2 commits intomainfromethan/url-scheme-docs
Jan 6, 2025
Merged

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedJan 6, 2025
edited
Loading

Closes#159.

This updates the documentation to include the access URL scheme in the example, matching the coder.com docs.

It also implicitly adds the scheme to the provided access URL if not present, only prependinghttp:// if the access URL is localhost. This is the same behaviour ascoder login.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

Comment on lines +105 to +114
rawURL := data.URL.ValueString()
if !strings.HasPrefix(rawURL, "http://") && !strings.HasPrefix(rawURL, "https://") {
scheme := "https"
if strings.HasPrefix(rawURL, "localhost") {
scheme = "http"
}
rawURL = fmt.Sprintf("%s://%s", scheme, rawURL)
}

url, err := url.Parse(rawURL)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@ethanndicksonethanndickson marked this pull request as ready for reviewJanuary 6, 2025 04:14
@ethanndicksonethanndickson merged commitfc84e01 intomainJan 6, 2025
14 checks passed
@ethanndicksonethanndickson deleted the ethan/url-scheme-docs branchJanuary 6, 2025 10:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Provider Resource - Improve Error Outputs
2 participants
@ethanndickson@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp