<commit_before>// Module included in the following assemblies:
//
// migration/migrating_openshift_3_to_4/migrating-openshift-3-to-4.adoc
[id='migration-configuring-cors-4_{context}']
= Configuring cross-origin resource sharing on {product-title} 4 clusters

If you are migrating to or from an {product-title} 4 cluster that does not have the CAM tool installed, you must configure configure cross-origin resource sharing so that the CAM tool can access the cluster's API server.

.Procedure

. Log in to the CAM tool cluster.
. Obtain the value for the CAM tool's CORS configuration:
+
----
$ oc get -n openshift-migration route/migration -o go-template='(?i)//{{ .spec.host }}(:|\z){{ println }}' | sed 's,\.,\\.,g'
----

. Log in to the {product-title} 4 cluster.
. Edit the API server CR:
+
----
$ oc edit authentication.operator cluster
----

. Add the CORS configuration value to the `additionalCORSAllowedOrigins` stanza:
+
[source,yaml]
----
spec:
  additionalCORSAllowedOrigins:
  - (?i)//migration-openshift-migration\.apps\.cluster\.com(:|\z) <1>
----
<1> Update the CORS configuration value.

. Save the file to apply the changes.<commit_msg>Quick typo fix to kick off builds<commit_after>// Module included in the following assemblies:
//
// migration/migrating_openshift_3_to_4/migrating-openshift-3-to-4.adoc
[id='migration-configuring-cors-4_{context}']
= Configuring cross-origin resource sharing on {product-title} 4 clusters

If you are migrating to or from an {product-title} 4 cluster that does not have the CAM tool installed, you must configure cross-origin resource sharing so that the CAM tool can access the cluster's API server.

.Procedure

. Log in to the CAM tool cluster.
. Obtain the value for the CAM tool's CORS configuration:
+
----
$ oc get -n openshift-migration route/migration -o go-template='(?i)//{{ .spec.host }}(:|\z){{ println }}' | sed 's,\.,\\.,g'
----

. Log in to the {product-title} 4 cluster.
. Edit the API server CR:
+
----
$ oc edit authentication.operator cluster
----

. Add the CORS configuration value to the `additionalCORSAllowedOrigins` stanza:
+
[source,yaml]
----
spec:
  additionalCORSAllowedOrigins:
  - (?i)//migration-openshift-migration\.apps\.cluster\.com(:|\z) <1>
----
<1> Update the CORS configuration value.

. Save the file to apply the changes.
{'fraction_non_alphanumeric': 0.13459879206212252, 'fraction_numerical': 0.008628127696289905, 'mean_word_length': 3.7134146341463414, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2966624', 'n_tokens_mistral': 758, 'n_tokens_neox': 723, 'n_words': 256}