Advertisement
Guest User

Untitled

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