Skip to content

Commit

Permalink
Merge pull request #215 from amadeus4dev/1218
Browse files Browse the repository at this point in the history
fallback
  • Loading branch information
minjikarin authored Dec 18, 2023
2 parents 2a22df1 + 2f9fd02 commit 8ae24e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

{% extends "base.html" %}
{% block extrahead %}

<script>
{ { super() } }
if (window.location.hostname === 'amadeus4dev.github.io') {
console.log('first script');
const path = window.location.pathname;
const redirectPattern = /^\/([^/]+)/;
const redirectUrl = path.replace(redirectPattern, 'https://developers.amadeus.com/self-service/apis-docs/guides/$1');
document.write(`<meta http-equiv="refresh" content="0;url=${redirectUrl}" />`);
}
{ { super() } }
</script>
{% endblock %}

Expand Down

0 comments on commit 8ae24e0

Please sign in to comment.