Within the <style>
section of the login page for my router's web interface, there is a CSS declaration that includes:
background: url("../img/login/logo.png")
This main page can be accessed from the IP address of my router (192.168.0.1:80). The page loads correctly in Chrome and the image is displayed without any issues. However, when attempting to access this URL in a browser or through a tool like Postman, a 403 response is received. More details on this response can be found here.
A similar problem arises when trying to set up an A
record in Route 53 to direct to my home network’s IP address. Images and other scripts on the site that use relative paths fail to load, showing as 403 errors in Chrome’s request/response information. The Request URL changes to my domain
http://myrouter.example.com:1337/img/login/logo.png
, with the remote address and referrer being my home network’s IP. Strangely, the rest of the login page loads normally with this setup, indicating that only the relative paths are causing issues.
Why is this happening? While I know that a 403 error means the server has rejected the request, it appears to be reaching the router but not responding with the image.