mirror of
https://github.com/efim/go-ssr-pocketbase-oauth-attempt.git
synced 2025-07-02 01:53:34 +00:00
bug was due to having explicit 'serve --http=address' when running behind nginx on NixOS server So either a more complicated check was required, or just setting Secure=true unconditionally. This seems to be a better way, because Firefox already allows secure cookies beng sent and received from localhost for dev purposes, and Chromium does too
20 lines
350 B
Go
20 lines
350 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"github.com/pocketbase/pocketbase"
|
|
"sunshine.industries/auth-pocketbase-attempt/middleware"
|
|
"sunshine.industries/auth-pocketbase-attempt/pages"
|
|
)
|
|
|
|
func main() {
|
|
app := pocketbase.New()
|
|
|
|
middleware.AddCookieSessionMiddleware(app)
|
|
pages.AddPageRoutes(app)
|
|
|
|
if err := app.Start(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|