tryFiles
and errorPages
./user/[USERID]
combination. If a user requests that URL though, we want the browser to return a file that can handle the logic for the web application, even though that file doesn't exist in the directory uploaded to Skynet.errorpages
, a Skynet Webportal will only ever encounter a 404 error on your deployment. Any other errors would result in not accessing your deployment, and thus not being able to serve your error page.@skynetlabs/skynet-nodejs 2.2.0
siasky.net/skynet/skyfile
and to URL-encode the JSON of the parameters.tryfiles
– If the file you requested does not exist, the web portal will iterate through the list, trying to return the specified file for the route requested. All directory uploads will now default to ["index.html"]
so for a request to /foo/
the webportal will serve /foo/index.html
. Absolute path file names will be returned if no other files are found, so using ["index.html", "/index.html"]
will return your root-level index.html
file if no other routes match the request. (If you have an absolute path defined, this file must exist in your directory, and will be returned with a status 200 when a 404 would otherwise be returned.)errorpages
– The maps a specific HTTP error status code with the absolute-path file to return if the error state is reached. This is not set by default, but for "traditional" style website, we suggest { 404: '/404.html' }
.skynet-nodejs
and skynet-js
use camelcase (tryFiles
) while the API endpoint uses lowercase (tryfiles
).gatsbyStatic
settings and still enable a 404 page./users/xyz_dynamic/
), use the gatsby
configuration and define a 404 behavior in the routes of your application. A 200 status response will be returned for these files.next-export
, (see their docs) but does not support this build method for projects using next-image
or any other unsupported feature.