Skip to content

Commit

Permalink
infra: Restrict the available routes for LTC
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexITC committed Jan 11, 2019
1 parent 7467bdc commit 66da2b5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions infra/deployment/config/ltc-routes
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Routes
# This file defines all application routes (Higher priority routes first)
# https://www.playframework.com/documentation/latest/ScalaRouting
# ~~~~

GET /health controllers.HealthController.check()
# GET /maintenance controllers.MaintenanceController.run(query: String ?= "")

GET /transactions/:txid controllers.TransactionsController.getTransaction(txid: String)
GET /transactions/:txid/raw controllers.TransactionsController.getRawTransaction(txid: String)
POST /transactions controllers.TransactionsController.sendRawTransaction()

GET /addresses/:address controllers.AddressesController.getBy(address: String)
GET /v2/addresses/:address/transactions controllers.AddressesController.getLightWalletTransactions(address: String, limit: Int ?= 10, lastSeenTxid: Option[String], order: String ?= "desc")

GET /blocks controllers.BlocksController.getLatestBlocks()
GET /blocks/:query controllers.BlocksController.getDetails(query: String)
GET /blocks/:query/raw controllers.BlocksController.getRawBlock(query: String)
GET /v2/blocks/:blockhash/transactions controllers.BlocksController.getTransactionsV2(blockhash: String, limit: Int ?= 10, lastSeenTxid: Option[String])

GET /stats controllers.StatisticsController.getStatus()

GET /v2/balances controllers.BalancesController.getHighest(limit: Int ?= 10, lastSeenAddress: Option[String])
8 changes: 8 additions & 0 deletions infra/deployment/ltc-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@
owner: play
group: play

- name: Set the application routes
become: yes
copy:
src: config/ltc-routes
dest: /home/play/app/xsn-block-explorer-0.1.0-SNAPSHOT/conf/routes
owner: play
group: play

- name: Set the application files permissions
become: yes
file:
Expand Down

0 comments on commit 66da2b5

Please sign in to comment.