Skip to content

Commit

Permalink
Merge pull request #202 from amadeus4dev/uatload
Browse files Browse the repository at this point in the history
redirection load in uat
  • Loading branch information
minjikarin authored Dec 12, 2023
2 parents 61697b5 + ef308c3 commit a0e8298
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
{#-
This file was automatically generated - do not edit
-#}
{% extends "base.html" %}

{% extends "base.html" %}
{% block scripts %}
<html lang="en">
<head>
<meta charset="utf-8">
<script>
if (window.location.hostname === 'amadeus4dev.github.io') {
console.log(window.location.hostname);
const path = window.location.pathname;
const redirectPattern = /^\/([^/]+)/;
const redirectUrl = path.replace(redirectPattern, 'https://uat.developers.amadeus.com/self-service/apis-docs/guides/$1/');
document.write(`<meta http-equiv="refresh" content="0;url=${redirectUrl}" />
<link rel="canonical" href="${redirectUrl}" />`);
}
</script>
</head>
</html>
{% endblock %}

0 comments on commit a0e8298

Please sign in to comment.