Configuration
Overview
The server configuration is mainly done in a file named application.yml
General
The general Crane Server configuration options are children of the app
property:
-
app.audit-logging
: activate auditing logs and store them in the specified file app.default-cache
: configures the default method of handling cache headers in the HTTP responsesapp.logo-url
: URL to an image used as the icon in the top left of the Crane websiteapp.openid-groups-claim
: claim name used to determine the group names of usersapp.openid-issuer-uri
: URI of the OpenID issuer for examplewww.my-keycloak.test
app.openid-logout-url
: logout URI of the OpenID provider for examplewww.my-keycloak.test/logout
app.openid-posix-uid-claim
: claim name used to extract the user identifier (UID) of users; only used with POSIX access controlapp.openid-posix-gids-claim
: claim name used to extract the group identifiers (GID) of users; only used with POSIX access controlapp.openid-username-claim
: claim name used to determine alternative username; only used with POSIX access controlapp.repositories
: a map of repository names defining the access control and possible sub-paths. Example:app: repositories: first_repository: read-access: users: [ jack, jeff ] write-access: groups: [ writter, author ] second_repository: read-access: public: true
app.repositories.[REPOSITORY_NAME].cache
: configures the method of handling cache headers in the HTTP responses on a repository level-
app.repositories.[REPOSITORY_NAME].storage-location
: location of the repositories files and directories -
app.repositories.[REPOSITORY_NAME].on-error-expression
: SpEL expression that allows changing the behaviour of Crane when an error occurs. app.repositories.[REPOSITORY_NAME].cache
: configure cache headers in the HTTP responses on a repository levelreport1: index-file-name: "1-introduction.html" cache: - pattern: "/**/*.gif" # Ant Path pattern: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/util/AntPathMatcher.html max-age: "P30D" # ISO-8601 duration: https://en.wikipedia.org/wiki/ISO_8601#Durations - pattern: "/**/*.jpg" max-age: "P30D" - pattern: "/**/*.jpeg" max-age: "P30D" - pattern: "/**/*.png" max-age: "P30D" - pattern: "/**/*.svg" max-age: "P30D" - pattern: "/**/*.css" max-age: "P1D" - pattern: "/**/*.js" max-age: "P1D" - pattern: "/**/*.json" max-age: "P1D" - pattern: "/**/*.html" max-age: "PT5M"
app.repositories.[REPOSITORY_NAME].storage-location
: optional property specifying the location of the repositories files and directoriesapp.repositories.[REPOSITORY_NAME].on-error-expression
: SpEL expression that allows changing the behaviour of Crane when an error occursapp.repositories.[REPOSITORY_NAME].index-file-name
: filename that Crane uses as the landing page of the repository. If the file isn’t present Crane usesdefault-index.html
instead. This property hasindex.html
as its default valueapp.storage-location
: Crane uses the defined location as a default place to look for files. Each repository appends its name to the storage location. E.g. if the storage location is/some/path
and a repository calledtest_repo
Crane then shows the files and directories in/some/path/test_repo
.app.s3-endpoint
: endpoint to the s3 providerapp.template-path
: optional path used to customize the landing page (listing of the apps) of Crane; it refers to the folder that contains the index.html page and all assets needed to serve the custom landing page
Besides the default option there also are some extra properties used by Crane Server:
server.servlet.context-path
: by default Crane runs on the/
context path; the context path can be configured using this property. Note that it should always start with a slash (as in/abcd
):server: servlet: context-path: /abcd
logging.level.eu
: if something weird is happening with your Crane Server you can have a look at the logs by changing the log level to one of the following valuesERROR
,WARN
,INFO
andDEBUG
. Don’t use this option in a production environment.