0

I'm supporting an Angular's website with Java as backend.

The problem is when the browser's cache was cleaned the URL returns NS_ERROR_DOM_BAD_URI. In a second call, the same URL run OK. Does anyone have any idea that what was happen?

Test after the browser's cache was cleaned

GET /v/data?cod=1&pageSize=10&page=0 undefined
Host: homol.com.br
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: application/json, text/plain, */*
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Authorization: Bearer xxx
client_id: xxx
Content-Type: application/json
Origin: http://angular-nodejs.homologacao.com.br
Connection: keep-alive
Referer: http://angular-nodejs.homologacao.com.br/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site

Test after the error before:

GET /v/data?cod=1&pageSize=10&page=0 HTTP/1.1
Host: homol.com.br
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: application/json, text/plain, */*
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Authorization: Bearer xxx
client_id: xxx
Content-Type: application/json
Origin: http://angular-nodejs.homologacao.com.br
Connection: keep-alive
Referer: http://angular-nodejs.homologacao.com.br/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site

P.S. Note that the HTTP/1.1 in the first test is undefined.

enter image description here

Luciana Oliveira
  • 822
  • 4
  • 14
  • 35
  • The following answers might help https://stackoverflow.com/questions/27186036/i18n-ns-error-dom-bad-uri-access-to-restricted-uri-denied https://stackoverflow.com/questions/17340482/ns-error-dom-bad-uri-access-to-restricted-uri-denied – Ironluca Aug 02 '23 at 06:35
  • @Ironluca, is it possible that I need to inclued the origin URL inside the APIC (Advanced Programmable Interrupt Controller) Cors's ? – Luciana Oliveira Aug 02 '23 at 19:41
  • 1
    You are getting the above error due to URL access under CORS. Refer: https://en.wikipedia.org/wiki/Cross-origin_resource_sharing Also check how the server is setup, especially the ACAO header from server. The URL provides the basic flow. – Ironluca Aug 03 '23 at 04:57

0 Answers0