Skip to content

Commit

Permalink
update base url structure
Browse files Browse the repository at this point in the history
  • Loading branch information
linomp committed Aug 10, 2024
1 parent 55bb923 commit dc3d8b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func main() {
w.Write([]byte(html))
})

log.Printf("Running on http://%s:%s\n", os.Getenv("HOST"), os.Getenv("PORT"))
log.Printf("Try oauth demo on http://%s:%s/oauthdemo\n", os.Getenv("HOST"), os.Getenv("PORT"))
log.Printf("Running on http://%s\n", os.Getenv("BASE_URL"))
log.Printf("Try oauth demo on http://%s/oauthdemo\n", os.Getenv("BASE_URL"))
log.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%s", os.Getenv("PORT")), mux))
}
2 changes: 1 addition & 1 deletion src/oauthdemo.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func init() {

// Initialize the OAuth2 config once during package initialization
googleOauthConfig = &oauth2.Config{
RedirectURL: fmt.Sprintf("http://%s:%s/google-oauth-callback", os.Getenv("HOST"), os.Getenv("PORT")),
RedirectURL: fmt.Sprintf("http://%s/google-oauth-callback", os.Getenv("BASE_URL")),
ClientID: os.Getenv("GOOGLE_CLIENT_ID"),
ClientSecret: os.Getenv("GOOGLE_CLIENT_SECRET"),
Scopes: []string{
Expand Down

0 comments on commit dc3d8b2

Please sign in to comment.