Skip to content

Commit

Permalink
check empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
bingzhang committed Feb 1, 2024
1 parent 8842042 commit 2a9cf45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/Application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Application @Inject()(files: FileService, collections: CollectionService,
def swaggerUI = Action { implicit request =>
val swagger = routes.Application.swagger().absoluteURL(Utils.https(request))
val swaggerUIHost = play.Play.application().configuration().getString("swaggerUIHost")
if (swaggerUIHost == null) {
if (swaggerUIHost == null || swaggerUIHost.isEmpty()) {
Redirect("http://clowder.ncsa.illinois.edu/swagger/?url=" + swagger)
} else {
Redirect(swaggerUIHost)
Expand Down
2 changes: 1 addition & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ clowder.license {
# swagger api doc host
# if no setting of swaggerUIHost, it will use https://clowder.ncsa.illinois.edu/swagger to show the swagger api doc.
# otherwise, you can point `swaggerUIHost` to your swagger-ui url to show the swagger api doc.
swaggerUIHost="http://localhost:8082"
swaggerUIHost=""

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Space related information
Expand Down

0 comments on commit 2a9cf45

Please sign in to comment.