I am facing issue with ionic and scala . From https://www.playframework.com/documentation/2.5.x/CorsFilter I checked that cors filter we use
play.filters.cors {
pathPrefixes = ["/some/path", ...]
allowedOrigins = ["http://www.example.com", ...]
allowedHttpMethods = ["GET", "POST"]
allowedHttpHeaders = ["Accept"]
preflightMaxAge = 3 days
}
When I am using following configuration
cors {
# The path prefixes to filter.
pathPrefixes = ["/"]
# The allowed origins. If null, all origins are allowed.
allowedOrigins = null
# The allowed HTTP methods. If null, all methods are allowed
allowedHttpMethods = null
# The allowed HTTP headers. If null, all headers are allowed.
allowedHttpHeaders = null
}
Then it is working on WEB not in Ionic APP but when I am using following configuration
cors {
pathPrefixes = ["/api"]
allowedOrigins = null
allowedHttpMethods = null
allowedHttpHeaders = null
}
Then it is working on APP not in web .. What to do to resolve issue. I don't know is this configuration issue or my ionic code issue.
From this http://blog.ionic.io/handling-cors-issues-in-ionic/ , I tried to work with {
"name": "proxy-example",
"app_id": "",
"proxies": [
{
"path": "/api",
"proxyUrl": "http://cors.api.com/api"
}
]
}
but it didn't work . Any help