api: WIP CORS supoport
This commit is contained in:
@ -9,6 +9,7 @@ type
|
||||
debug*: bool
|
||||
port*: int
|
||||
pwdCost*: int8
|
||||
knownOrigins*: seq[string]
|
||||
|
||||
PMApiContext* = object
|
||||
cfg*: PMApiConfig
|
||||
@ -23,7 +24,8 @@ proc `%`*(cfg: PMApiConfig): JsonNode =
|
||||
"dbConnString": cfg.dbConnString,
|
||||
"debug": cfg.debug,
|
||||
"port": cfg.port,
|
||||
"pwdCost": cfg.pwdCost }
|
||||
"pwdCost": cfg.pwdCost,
|
||||
"knownOrigins": cfg.knownOrigins }
|
||||
|
||||
template raiseEx*(errorType: type, reason: string): void =
|
||||
raise newException(errorType, reason)
|
||||
|
Reference in New Issue
Block a user