Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
UPHRH-lms-service
Commits
30ea3e30
Commit
30ea3e30
authored
2 years ago
by
aimansharief
Browse files
Options
Download
Patches
Plain Diff
feat : add Cname changes
parent
c7c7df87
master
bootcamp
helmchart
release-5.0.1
release-5.0.2
release-5.1.0
release-5.2.0
release-5.2.1
release-5.3.0
release-5.3.1
release-5.4.0
release-5.3.1_RC1
release-5.3.0_RC1
release-5.2.0_RC2
release-5.2.0_RC1
release-5.1.0_RC2
release-5.1.0_RC1
release-5.0.1_RC3
release-5.0.1_RC2
release-5.0.1_RC1
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java
+2
-0
...src/main/java/org/sunbird/common/models/util/JsonKey.java
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/resources/externalresource.properties
+2
-1
...ommon-util/src/main/resources/externalresource.properties
service/app/filters/ResponseFilter.scala
+30
-0
service/app/filters/ResponseFilter.scala
service/conf/application.conf
+1
-0
service/conf/application.conf
with
35 additions
and
1 deletion
+35
-1
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/java/org/sunbird/common/models/util/JsonKey.java
+
2
−
0
View file @
30ea3e30
...
...
@@ -789,6 +789,8 @@ public final class JsonKey {
public
static
final
String
GCLOUD_STR
=
"gcloud"
;
public
static
final
String
CLOUD_FOLDER_CONTENT
=
"sunbird_cloud_content_folder"
;
public
static
final
String
CLOUD_STORE_BASE_PATH
=
"$CLOUD_STORE_BASE_PATH"
;
public
static
final
String
CLOUD_STORE_BASE_PATH_VALUE
=
"cloud_store_base_path_value"
;
public
static
final
String
TO_URL
=
"toUrl"
;
public
static
final
String
TTL
=
"ttl"
;
public
static
final
String
TEXTBOOK_TOC_CSV_TTL
=
"sunbird_texbook_toc_csv_ttl"
;
...
...
This diff is collapsed.
Click to expand it.
course-mw/sunbird-util/sunbird-platform-core/common-util/src/main/resources/externalresource.properties
+
2
−
1
View file @
30ea3e30
...
...
@@ -205,4 +205,5 @@ kafka_assessment_topic=
sunbird_msg_sender
=
sunbird_msg_91_auth
=
sunbird_api_mgr_base_url
=
https://dev.sunbirded.org/api
enrollment_list_size
=
1000
\ No newline at end of file
enrollment_list_size
=
1000
cloud_store_base_path_value
=
https://sunbirddev.blob.core.windows.net/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
service/app/filters/ResponseFilter.scala
0 → 100644
+
30
−
0
View file @
30ea3e30
package
filters
import
akka.stream.Materializer
import
akka.util.ByteString
import
org.sunbird.common.models.util.JsonKey
import
play.api.http.HttpEntity.Strict
import
play.api.mvc.
{
Filter
,
RequestHeader
,
Result
}
import
org.sunbird.common.models.util.ProjectUtil.getConfigValue
import
javax.inject.Inject
import
scala.concurrent.
{
ExecutionContext
,
Future
}
class
ResponseFilter
@Inject
()(
implicit
val
mat
:
Materializer
,
ec
:
ExecutionContext
)
extends
Filter
{
override
def
apply
(
nextFilter
:
(
RequestHeader
)
=>
Future
[
Result
])(
rh
:
RequestHeader
)
=
nextFilter
(
rh
)
flatMap
{
result
=>
println
(
"Executing ResponseFilter (plain filter) in course-service..."
)
val
contentType
=
result
.
body
.
contentType
val
updatedBody
=
result
.
body
.
consumeData
.
map
{
x
=>
val
y
=
x
.
utf8String
.
replaceAll
(
JsonKey
.
CLOUD_STORE_BASE_PATH
,
getConfigValue
(
JsonKey
.
CLOUD_STORE_BASE_PATH_VALUE
))
println
(
"updated body: "
+
y
)
y
}
updatedBody
map
{
x
=>
println
(
"inside updatedBody map. "
)
result
.
copy
(
body
=
Strict
(
ByteString
(
x
),
contentType
))
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
service/conf/application.conf
+
1
−
0
View file @
30ea3e30
...
...
@@ -332,5 +332,6 @@ play.filters {
}
enabled
+=
filters
.
AccessLogFilter
enabled
+=
filters
.
CustomGzipFilter
enabled
+=
filters
.
ResponseFilter
disabled
+=
play
.
filters
.
csrf
.
CSRFFilter
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets