application.conf 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. # This is the main configuration file for the application.
  2. # https://www.playframework.com/documentation/latest/ConfigFile
  3. # ~~~~~
  4. # Play uses HOCON as its configuration file format. HOCON has a number
  5. # of advantages over other config formats, but there are two things that
  6. # can be used when modifying settings.
  7. #
  8. # You can include other configuration files in this main application.conf file:
  9. #include "extra-config.conf"
  10. #
  11. # You can declare variables and substitute for them:
  12. #mykey = ${some.value}
  13. #
  14. # And if an environment variable exists when there is no other subsitution, then
  15. # HOCON will fall back to substituting environment variable:
  16. #mykey = ${JAVA_HOME}
  17. ## Akka
  18. # https://www.playframework.com/documentation/latest/ScalaAkka#Configuration
  19. # https://www.playframework.com/documentation/latest/JavaAkka#Configuration
  20. # ~~~~~
  21. # Play uses Akka internally and exposes Akka Streams and actors in Websockets and
  22. # other streaming HTTP responses.
  23. akka {
  24. # "akka.log-config-on-start" is extraordinarly useful because it log the complete
  25. # configuration at INFO level, including defaults and overrides, so it s worth
  26. # putting at the very top.
  27. #
  28. # Put the following in your conf/logback.xml file:
  29. #
  30. # <logger name="akka.actor" level="INFO" />
  31. #
  32. # And then uncomment this line to debug the configuration.
  33. #
  34. #log-config-on-start = true
  35. }
  36. ## Secret key
  37. # http://www.playframework.com/documentation/latest/ApplicationSecret
  38. # ~~~~~
  39. # The secret key is used to sign Play's session cookie.
  40. # This must be changed for production, but we don't recommend you change it in this file.
  41. play.crypto.secret = "changeme"
  42. ## Modules
  43. # https://www.playframework.com/documentation/latest/Modules
  44. # ~~~~~
  45. # Control which modules are loaded when Play starts. Note that modules are
  46. # the replacement for "GlobalSettings", which are deprecated in 2.5.x.
  47. # Please see https://www.playframework.com/documentation/latest/GlobalSettings
  48. # for more information.
  49. #
  50. # You can also extend Play functionality by using one of the publically available
  51. # Play modules: https://playframework.com/documentation/latest/ModuleDirectory
  52. play.modules {
  53. # By default, Play will load any class called Module that is defined
  54. # in the root package (the "app" directory), or you can define them
  55. # explicitly below.
  56. # If there are any built-in modules that you want to disable, you can list them here.
  57. #enabled += my.application.Module
  58. # If there are any built-in modules that you want to disable, you can list them here.
  59. #disabled += ""
  60. }
  61. ## IDE
  62. # https://www.playframework.com/documentation/latest/IDE
  63. # ~~~~~
  64. # Depending on your IDE, you can add a hyperlink for errors that will jump you
  65. # directly to the code location in the IDE in dev mode. The following line makes
  66. # use of the IntelliJ IDEA REST interface:
  67. #play.editor="http://localhost:63342/api/file/?file=%s&line=%s"
  68. ## Internationalisation
  69. # https://www.playframework.com/documentation/latest/JavaI18N
  70. # https://www.playframework.com/documentation/latest/ScalaI18N
  71. # ~~~~~
  72. # Play comes with its own i18n settings, which allow the user's preferred language
  73. # to map through to internal messages, or allow the language to be stored in a cookie.
  74. play.i18n {
  75. # The application languages
  76. langs = [ "en" ]
  77. # Whether the language cookie should be secure or not
  78. #langCookieSecure = true
  79. # Whether the HTTP only attribute of the cookie should be set to true
  80. #langCookieHttpOnly = true
  81. }
  82. ## Play HTTP settings
  83. # ~~~~~
  84. play.http {
  85. ## Router
  86. # https://www.playframework.com/documentation/latest/JavaRouting
  87. # https://www.playframework.com/documentation/latest/ScalaRouting
  88. # ~~~~~
  89. # Define the Router object to use for this application.
  90. # This router will be looked up first when the application is starting up,
  91. # so make sure this is the entry point.
  92. # Furthermore, it's assumed your route file is named properly.
  93. # So for an application router like `my.application.Router`,
  94. # you may need to define a router file `conf/my.application.routes`.
  95. # Default to Routes in the root package (aka "apps" folder) (and conf/routes)
  96. #router = my.application.Router
  97. ## Action Creator
  98. # https://www.playframework.com/documentation/latest/JavaActionCreator
  99. # ~~~~~
  100. #actionCreator = null
  101. ## ErrorHandler
  102. # https://www.playframework.com/documentation/latest/JavaRouting
  103. # https://www.playframework.com/documentation/latest/ScalaRouting
  104. # ~~~~~
  105. # If null, will attempt to load a class called ErrorHandler in the root package,
  106. #errorHandler = null
  107. ## Filters
  108. # https://www.playframework.com/documentation/latest/ScalaHttpFilters
  109. # https://www.playframework.com/documentation/latest/JavaHttpFilters
  110. # ~~~~~
  111. # Filters run code on every request. They can be used to perform
  112. # common logic for all your actions, e.g. adding common headers.
  113. # Defaults to "Filters" in the root package (aka "apps" folder)
  114. # Alternatively you can explicitly register a class here.
  115. #filters = my.application.Filters
  116. ## Session & Flash
  117. # https://www.playframework.com/documentation/latest/JavaSessionFlash
  118. # https://www.playframework.com/documentation/latest/ScalaSessionFlash
  119. # ~~~~~
  120. session {
  121. # Sets the cookie to be sent only over HTTPS.
  122. #secure = true
  123. # Sets the cookie to be accessed only by the server.
  124. #httpOnly = true
  125. # Sets the max-age field of the cookie to 5 minutes.
  126. # NOTE: this only sets when the browser will discard the cookie. Play will consider any
  127. # cookie value with a valid signature to be a valid session forever. To implement a server side session timeout,
  128. # you need to put a timestamp in the session and check it at regular intervals to possibly expire it.
  129. #maxAge = 300
  130. # Sets the domain on the session cookie.
  131. #domain = "example.com"
  132. }
  133. flash {
  134. # Sets the cookie to be sent only over HTTPS.
  135. #secure = true
  136. # Sets the cookie to be accessed only by the server.
  137. #httpOnly = true
  138. }
  139. }
  140. ## Netty Provider
  141. # https://www.playframework.com/documentation/latest/SettingsNetty
  142. # ~~~~~
  143. play.server.netty {
  144. # Whether the Netty wire should be logged
  145. #log.wire = true
  146. # If you run Play on Linux, you can use Netty's native socket transport
  147. # for higher performance with less garbage.
  148. #transport = "native"
  149. }
  150. ## WS (HTTP Client)
  151. # https://www.playframework.com/documentation/latest/ScalaWS#Configuring-WS
  152. # ~~~~~
  153. # The HTTP client primarily used for REST APIs. The default client can be
  154. # configured directly, but you can also create different client instances
  155. # with customized settings. You must enable this by adding to build.sbt:
  156. #
  157. # libraryDependencies += ws // or javaWs if using java
  158. #
  159. play.ws {
  160. # Sets HTTP requests not to follow 302 requests
  161. #followRedirects = false
  162. # Sets the maximum number of open HTTP connections for the client.
  163. #ahc.maxConnectionsTotal = 50
  164. ## WS SSL
  165. # https://www.playframework.com/documentation/latest/WsSSL
  166. # ~~~~~
  167. ssl {
  168. # Configuring HTTPS with Play WS does not require programming. You can
  169. # set up both trustManager and keyManager for mutual authentication, and
  170. # turn on JSSE debugging in development with a reload.
  171. #debug.handshake = true
  172. #trustManager = {
  173. # stores = [
  174. # { type = "JKS", path = "exampletrust.jks" }
  175. # ]
  176. #}
  177. }
  178. }
  179. ## Cache
  180. # https://www.playframework.com/documentation/latest/JavaCache
  181. # https://www.playframework.com/documentation/latest/ScalaCache
  182. # ~~~~~
  183. # Play comes with an integrated cache API that can reduce the operational
  184. # overhead of repeated requests. You must enable this by adding to build.sbt:
  185. #
  186. # libraryDependencies += cache
  187. #
  188. play.cache {
  189. # If you want to bind several caches, you can bind the individually
  190. #bindCaches = ["db-cache", "user-cache", "session-cache"]
  191. }
  192. ## Filters
  193. # https://www.playframework.com/documentation/latest/Filters
  194. # ~~~~~
  195. # There are a number of built-in filters that can be enabled and configured
  196. # to give Play greater security. You must enable this by adding to build.sbt:
  197. #
  198. # libraryDependencies += filters
  199. #
  200. play.filters {
  201. ## CORS filter configuration
  202. # https://www.playframework.com/documentation/latest/CorsFilter
  203. # ~~~~~
  204. # CORS is a protocol that allows web applications to make requests from the browser
  205. # across different domains.
  206. # NOTE: You MUST apply the CORS configuration before the CSRF filter, as CSRF has
  207. # dependencies on CORS settings.
  208. cors {
  209. # Filter paths by a whitelist of path prefixes
  210. #pathPrefixes = ["/some/path", ...]
  211. # The allowed origins. If null, all origins are allowed.
  212. #allowedOrigins = ["http://www.example.com"]
  213. # The allowed HTTP methods. If null, all methods are allowed
  214. #allowedHttpMethods = ["GET", "POST"]
  215. }
  216. ## CSRF Filter
  217. # https://www.playframework.com/documentation/latest/ScalaCsrf#Applying-a-global-CSRF-filter
  218. # https://www.playframework.com/documentation/latest/JavaCsrf#Applying-a-global-CSRF-filter
  219. # ~~~~~
  220. # Play supports multiple methods for verifying that a request is not a CSRF request.
  221. # The primary mechanism is a CSRF token. This token gets placed either in the query string
  222. # or body of every form submitted, and also gets placed in the users session.
  223. # Play then verifies that both tokens are present and match.
  224. csrf {
  225. # Sets the cookie to be sent only over HTTPS
  226. #cookie.secure = true
  227. # Defaults to CSRFErrorHandler in the root package.
  228. #errorHandler = MyCSRFErrorHandler
  229. }
  230. ## Security headers filter configuration
  231. # https://www.playframework.com/documentation/latest/SecurityHeaders
  232. # ~~~~~
  233. # Defines security headers that prevent XSS attacks.
  234. # If enabled, then all options are set to the below configuration by default:
  235. headers {
  236. # The X-Frame-Options header. If null, the header is not set.
  237. #frameOptions = "DENY"
  238. # The X-XSS-Protection header. If null, the header is not set.
  239. #xssProtection = "1; mode=block"
  240. # The X-Content-Type-Options header. If null, the header is not set.
  241. #contentTypeOptions = "nosniff"
  242. # The X-Permitted-Cross-Domain-Policies header. If null, the header is not set.
  243. #permittedCrossDomainPolicies = "master-only"
  244. # The Content-Security-Policy header. If null, the header is not set.
  245. #contentSecurityPolicy = "default-src 'self'"
  246. }
  247. ## Allowed hosts filter configuration
  248. # https://www.playframework.com/documentation/latest/AllowedHostsFilter
  249. # ~~~~~
  250. # Play provides a filter that lets you configure which hosts can access your application.
  251. # This is useful to prevent cache poisoning attacks.
  252. hosts {
  253. # Allow requests to example.com, its subdomains, and localhost:9000.
  254. #allowed = [".example.com", "localhost:9000"]
  255. }
  256. }
  257. ## Evolutions
  258. # https://www.playframework.com/documentation/latest/Evolutions
  259. # ~~~~~
  260. # Evolutions allows database scripts to be automatically run on startup in dev mode
  261. # for database migrations. You must enable this by adding to build.sbt:
  262. #
  263. # libraryDependencies += evolutions
  264. #
  265. play.evolutions {
  266. # You can disable evolutions for a specific datasource if necessary
  267. #db.default.enabled = false
  268. }
  269. ## Database Connection Pool
  270. # https://www.playframework.com/documentation/latest/SettingsJDBC
  271. # ~~~~~
  272. # Play doesn't require a JDBC database to run, but you can easily enable one.
  273. #
  274. # libraryDependencies += jdbc
  275. #
  276. play.db {
  277. # The combination of these two settings results in "db.default" as the
  278. # default JDBC pool:
  279. #config = "db"
  280. #default = "default"
  281. # Play uses HikariCP as the default connection pool. You can override
  282. # settings by changing the prototype:
  283. prototype {
  284. # Sets a fixed JDBC connection pool size of 50
  285. #hikaricp.minimumIdle = 50
  286. #hikaricp.maximumPoolSize = 50
  287. }
  288. }
  289. ## JDBC Datasource
  290. # https://www.playframework.com/documentation/latest/JavaDatabase
  291. # https://www.playframework.com/documentation/latest/ScalaDatabase
  292. # ~~~~~
  293. # Once JDBC datasource is set up, you can work with several different
  294. # database options:
  295. #
  296. # Slick (Scala preferred option): https://www.playframework.com/documentation/latest/PlaySlick
  297. # JPA (Java preferred option): https://playframework.com/documentation/latest/JavaJPA
  298. # EBean: https://playframework.com/documentation/latest/JavaEbean
  299. # Anorm: https://www.playframework.com/documentation/latest/ScalaAnorm
  300. #
  301. db {
  302. # You can declare as many datasources as you want.
  303. # By convention, the default datasource is named `default`
  304. # https://www.playframework.com/documentation/latest/Developing-with-the-H2-Database
  305. #default.driver = org.h2.Driver
  306. #default.url = "jdbc:h2:mem:play"
  307. #default.username = sa
  308. #default.password = ""
  309. # You can turn on SQL logging for any datasource
  310. # https://www.playframework.com/documentation/latest/Highlights25#Logging-SQL-statements
  311. #default.logSql=true
  312. }