Hello.
In middle east countries they use what called Hijri date (Islamic date). This date is supported in Mediawiki core. And can be retrieved using time function like this:
{{#time:xmj xmF xmY}}
There is a problem always with the hijri date in wikimedia websites. I use time function to retrieve the hijri date in any sisters wiki, but sometimes it retrieve the wrong date. And we have to delay, or advance the date each month. The problem with hijri date is that it depends on Moon move. And calculations doesn't work every time.
In arwiki, we've discussed this problem several times. And the best option we reach is to write a script (JavaScript) to retrieve the date from trusted website (https://hijri.today/). This website is very trusted, and it get the exact date, without any percentage of mistake. The solution is to make ajax request to the previous website, and then get the date from that ajax request, then inner it inside wikipedia template.
The problem is that when I make the ajax request to the previous website it always said:
Report Only] Refused to connect to 'https://hijri.today/' because it violates the following Content Security Policy directive: "default-src 'self' data: blob: upload.wikimedia.org https://commons.wikimedia.org meta.wikimedia.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikivoyage.org *.mediawiki.org wikimedia.org". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
Access to XMLHttpRequest at 'https://hijri.today/' from origin 'https://ar.wikipedia.org' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Is there is any way to make ajax request to the previous website without facing these errors?