File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
ingest-app/src/cmr/ingest/api
message-queue-lib/src/cmr/message_queue/queue
src/cmr/metadata_db/services
test/cmr/metadata_db/test/services Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 8484 [subscription-concept]
8585 (let [method (:Method subscription-concept)
8686 endpoint (:EndPoint subscription-concept)
87- default-url-validator (UrlValidator. )]
87+ default-url-validator (UrlValidator. UrlValidator/ALLOW_LOCAL_URLS )]
8888
8989 (if (= method " ingest" )
9090 (if-not (or (some? (re-matches #"arn:aws:sqs:.*" endpoint)) (.isValid default-url-validator endpoint))
Original file line number Diff line number Diff line change 3333 (.build ))))
3434
3535(defn create-queue
36- " Create an instance of a an AWS queue in either AWS or elasticMQ."
36+ " Create an instance of an AWS queue in either AWS or elasticMQ."
3737 [sqs-client queue-name]
3838 (try
3939 (let [sqs-request (-> (CreateQueueRequest/builder )
Original file line number Diff line number Diff line change 122122(defn- is-valid-subscription-endpoint-url
123123 " Checks if subscription endpoint destination is a valid url. Returns true or false."
124124 [endpoint]
125- (let [default-validator (UrlValidator. )]
125+ (let [default-validator (UrlValidator. UrlValidator/ALLOW_LOCAL_URLS )]
126126 (.isValid default-validator endpoint)))
127127
128128(defn- send-sub-to-url-dest
Original file line number Diff line number Diff line change 711711 (let [fun #'cmr.metadata-db.services.subscriptions/is-valid-subscription-endpoint-url]
712712 (is (= expected (fun endpoint))))
713713
714+ " valid local url -- with http prefix"
715+ true
716+ " http://localhost:9324/000000000000"
717+
718+ " valid local url -- with https prefix"
719+ true
720+ " https://localhost:9324/000000000000"
721+
714722 " valid url -- with https prefix"
715723 true
716724 " https://www.google.com"
You can’t perform that action at this time.
0 commit comments