(READ ONLY) Margin is an open annotation layer for the internet. Powered by the AT Protocol. margin.at
extension web atproto comments
99
fork

Configure Feed

Select the types of activity you want to include in your feed.

this wasnt needed

scanash00 e55e33dd cb85af63

+1 -20
+1 -20
backend/cmd/server/main.go
··· 6 6 "net/http" 7 7 "os" 8 8 "os/signal" 9 - "strings" 10 9 "syscall" 11 10 "time" 12 11 ··· 63 62 r.Use(middleware.Throttle(100)) 64 63 65 64 r.Use(cors.Handler(cors.Options{ 66 - AllowOriginFunc: func(r *http.Request, origin string) bool { 67 - if strings.HasPrefix(origin, "chrome-extension://") || 68 - strings.HasPrefix(origin, "moz-extension://") || 69 - strings.HasPrefix(origin, "safari-web-extension://") { 70 - return true 71 - } 72 - allowedOrigins := []string{ 73 - "https://margin.at", 74 - "https://www.margin.at", 75 - "http://localhost:4321", 76 - "http://localhost:8081", 77 - } 78 - for _, allowed := range allowedOrigins { 79 - if origin == allowed { 80 - return true 81 - } 82 - } 83 - return false 84 - }, 65 + AllowedOrigins: []string{"https://*", "http://*", "chrome-extension://*"}, 85 66 AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, 86 67 AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token", "X-Session-Token"}, 87 68 ExposedHeaders: []string{"Link"},