<p>You'll want to be sure your spec.tls section has the following two items to tell the router you want both secure and insecure traffic allowed in the edge. </p>

<pre><code>apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: my-app-ui
  namespace: my-namespace
spec:
  host: my-host
  port:
    targetPort: http
  tls:
    insecureEdgeTerminationPolicy: Allow
    termination: edge
  to:
    kind: Service
    name: my-app-ui
    weight: 100
  wildcardPolicy: None
</code></pre>

CC BY-SA 4.0
2020-03-13T18:24:15.017Z
2020-03-13T18:24:15.017Z
Josiah
<p>I'd like to setup a route that will pass both 80 and 443 traffic to the same service in OpenShift. When I try to create a second route it errors out. I want this to be in a yaml like would be used with <code>oc create -f route.yaml</code> so I can submit it to our IaC code repo.</p>

CC BY-SA 4.0
2020-03-14T10:11:50.027Z
Could you add the logging?
030
<security><networking><openshift><encryption>
How do I setup an OpenShift route that will allow both 80 and 443 traffic to my app?
Josiah
# How do I setup an OpenShift route that will allow both 80 and 443 traffic to my app?

(Asked by: username_0 on 2020-03-13)

I'd like to setup a route that will pass both 80 and 443 traffic to the same service in OpenShift. When I try to create a second route it errors out. I want this to be in a yaml like would be used with `oc create -f route.yaml` so I can submit it to our IaC code repo.

**Tags:** security, networking, openshift, encryption

> **Comments:**
> **username_1**: Could you add the logging?  

---

## 1 answers

### Answer by username_0 on 2020-03-13. Score: 1

You'll want to be sure your spec.tls section has the following two items to tell the router you want both secure and insecure traffic allowed in the edge. 
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: my-app-ui
  namespace: my-namespace
spec:
  host: my-host
  port:
    targetPort: http
  tls:
    insecureEdgeTerminationPolicy: Allow
    termination: edge
  to:
    kind: Service
    name: my-app-ui
    weight: 100
  wildcardPolicy: None


---

