# https://www.playframework.com/documentation/latest/Configuration
play.application.loader=NiosxApplicationLoader
play.editor="http://localhost:63342/api/file/?file=%s&line=%s"
play.http.errorHandler = play.api.http.HtmlOrJsonHttpErrorHandler

play.akka.actor-system = "niosx-actor"
contexts {
  repository-dispatcher {
    executor = "thread-pool-executor"
    throughput = 1
    thread-pool-executor {
      fixed-pool-size = 20
    }
  }
}


play.http.secret.key="changeme"
play.http.secret.key=${?APPLICATION_SECRET}

play.server.pidfile.path=/dev/null

#Override these for different projects
baseUri="https://api.milli.link/"

play.filters.hosts {
  # Allow requests to milli.link, its subdomains, and localhost:9000.
  allowed = [".milli.link", "localhost:9000", "localhost:9101", "api.milli.link"]
}
play.modules {
  enabled += "play.filters.cors.CORSModule"
#  enabled += "play.filters.headers.SecurityHeadersModule"
#  enabled += "play.filters.hosts.AllowedHostsModule"
#  enabled += "play.filters.gzip.GzipFilterModule"
#  enabled += "play.filters.https.RedirectHttpsModule"
}
play.filters.enabled += play.filters.cors.CORSFilter
play.filters.cors {
  allowedOrigins = null
  #allowedHttpMethods = ["GET", "POST"]
  #allowedHttpHeaders = ["Accept"]
  #preflightMaxAge = 3 days
}


#Authentication
default.admin.password="changeme"
default.admin.password=${?DEFAULT_ADMIN_PASS}
default.bulk.upload.key="bulkupload"
default.bulk.upload.key=${?BULK_UPLOAD_KEY}

#JanusGraph
dev.mode=true
dev.mode=${?DEV_MODE}

#TODO: Move to resource file
#TODO: Resource translation tool creation and enable I18n
niosx.resource {
  default {
    image.alt="No accessibility aid has been made available for this image."
  }

  #Palestinian Arabic https://iso639-3.sil.org/code/ajp
  ajp {
    lang {
      code="ajp"
      iso639="https://iso639-3.sil.org/code/ajp"
      textDire="RTL"
      }
    #"There is no translation for this resource."
    TRANSLATION_ERROR="لا توجد ترجمة لهذا المورد"
    #image.alt="تضامنا مع عمال العالم."
  }
}

#Local installation
local=true
local=${?LOCAL}
#include "securesocial.conf"
