mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
First webui commit
This commit is contained in:
parent
e38f5d08ab
commit
c4611b92f8
2011 changed files with 30382 additions and 1874 deletions
|
@ -1,8 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gorilla/handlers"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/handlers"
|
||||
)
|
||||
|
||||
// applyCORSHandler applies a CORS policy to the router. CORS stands for Cross-Origin Resource Sharing: it's a security
|
||||
|
@ -11,8 +12,10 @@ import (
|
|||
func applyCORSHandler(h http.Handler) http.Handler {
|
||||
return handlers.CORS(
|
||||
handlers.AllowedHeaders([]string{
|
||||
"x-example-header",
|
||||
"Content-Type",
|
||||
"Authorization",
|
||||
}),
|
||||
handlers.AllowCredentials(),
|
||||
handlers.AllowedMethods([]string{"GET", "POST", "OPTIONS", "DELETE", "PUT"}),
|
||||
handlers.AllowedOrigins([]string{"*"}),
|
||||
)(h)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.9 MiB |
|
@ -29,7 +29,7 @@ type WebAPIConfiguration struct {
|
|||
Filename string `conf:"default:./wasaphoto.db"`
|
||||
}
|
||||
Data struct {
|
||||
Path string `conf:"default:/tmp/wasaphoto"`
|
||||
Path string `conf:"default:./data"`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go:build !webui
|
||||
//go:build !webui
|
||||
|
||||
package main
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue