Skip to content

Commit

Permalink
Merge branch 'development' into seo-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sd-ditoy committed Feb 7, 2024
2 parents 840ed8f + 6a0a256 commit fd79c6d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .cicd/manifests/ingress-kr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# note: We explicitly create each language subdomain, rather than a wildcard domain
# as wildcards are not supportd by http01 cert-manager ClusterIssuer

{{- if .Values.ingressDomainName}}

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: {{.Values.namespace}}
name: kr-{{.Values.appName}}-{{.Values.envName}}-ingress
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- kr.{{.Values.ingressDomainName}}
secretName: kr-{{.Values.appName}}-{{.Values.envName}}-tls
rules:
- host: kr.{{.Values.ingressDomainName}}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{.Values.appName}}-{{.Values.envName}}-svc
port:
number: {{.Values.servicePort}}
ingressClassName: nginx

{{- end}}
2 changes: 1 addition & 1 deletion .cicd/values/frontend-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Deployment
replicaCount: 15
replicaCount: 3

#Pod
resourceCpuRequest: 200m
Expand Down
3 changes: 2 additions & 1 deletion src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ export default {
// destroyed() {},
methods: {
testForCountryPage() {
this.hideNavigation = /^[a-zA-Z]{2}.casper.network/.test(window.location.hostname);
const { hostname } = window.location;
this.hideNavigation = /^[a-zA-Z]{2}.casper.network/.test(hostname) || /^[a-zA-Z]{2}.staging.casper.network/.test(hostname);
},
goHome() {
if (this.hideNavigation) {
Expand Down
9 changes: 7 additions & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,16 @@ export function getRouter() {

let isCountryLP = false;
let countryCode = null;
const hostname = window.location.hostname;
const { hostname } = window.location;

if (/^[a-zA-Z]{2}.casper.network/.test(hostname)) {
const prodDomainTest = /^[a-zA-Z]{2}.casper.network/.test(hostname);
const stagingDomainTest = /^[a-zA-Z]{2}.staging.casper.network/.test(hostname);
if (prodDomainTest || stagingDomainTest) {
isCountryLP = true;
countryCode = hostname.replace('.casper.network', '');
if (countryCode.includes('.')) {
countryCode = hostname.replace('.staging.casper.network', '');
}
ignoreLanguage = true;
language = 'en-us';
}
Expand Down

0 comments on commit fd79c6d

Please sign in to comment.