Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

529 B
Raw Blame
package s3api

import (
	"encoding/json"
	"net/http"

	"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
)

func (s3a *S3ApiServer) StatusHandler(w http.ResponseWriter, r *http.Request) {
	if _, features := r.URL.Query()["features"]; features {
		body, _ := json.Marshal(map[string]bool{"sseS3": GetSSES3KeyManager().IsConfigured()})
		s3err.WriteResponse(w, r, http.StatusOK, body, "application/json")
		return
	}
	// write out the response code and content type header
	s3err.WriteResponse(w, r, http.StatusOK, []byte{}, "")
}