f8e0615cc8
These changes ensure that the new (SHA256) session ID is returned in the "session_id" field, so that developers have time to update their client implementations to use the new "access_token" field. Signed-off-by: Michael Mayer <michael@photoprism.app>
16 lines
478 B
Go
16 lines
478 B
Go
package server
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
|
"github.com/photoprism/photoprism/pkg/header"
|
|
)
|
|
|
|
// Security adds common HTTP security headers to the response.
|
|
var Security = func(conf *config.Config) gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
c.Writer.Header().Set(header.ContentSecurityPolicy, header.DefaultContentSecurityPolicy)
|
|
c.Writer.Header().Set(header.FrameOptions, header.DefaultFrameOptions)
|
|
}
|
|
}
|