How to add custom error page to app served with shinyproxy - shinyproxy

I am serving a R app using ShinyProxy with default configurations. When there is an error, the default error page exposes a lot of information about what caused the error. I would like to replace the error page, but cannot figure out where to find the HTML that creates the error message.
There is a git repo https://github.com/openanalytics/shinyproxy-config-examples/tree/master/04-custom-html-template shows how to change html for log in and the index page, but i cannot seem to find the error- does anyone have any suggestions?

Maybe this will help: https://www.tutorialspoint.com/adding-404-page-in-express
and you can replace res.send('<h1> Page not found </h1>'); with res.sendFile(pagedir);

Related

How to Stop Redirecting to 404 page When page Not found in Next.js

I want to stop redirecting to 404 page when page not found in my next.js app. I just want to show my 404 component without redirecting or changing URL.
Currently, next.js redirecting to 404/ URL.
Is there any ways?
Thanks!
The Next.js framework has built-in ways for handling 404, 500, and other errors that may occur on your website. But to add custom layout and styling to those pages, you'll need to create both a /pages/404.js and /pages/_error.js file.
When one of those errors occur, Next.js will render that page instead of the default page it would otherwise automatically generate.
The /pages/404.js file will handle all 404 related errors. And the /pages/_error.js file will handle 500 type errors.
here's official documentation customizing 404
You can create custom 404 page in NextJS with creating file in
/pages/404.js
You can create page for 404 error.
For more Details click here

Tags page in jekyll site working locally but not on GitHub pages, gives 404 error

Wanted to create a "tags page" that has all posts with a certain tag. I added it to the header of my website but I keep getting a 404 error. It looks like the tags page isn't building at all?
404 Error page:
https://tiffanychenster.github.io/personal-blog/tag/reviews/
Repo:
https://github.com/tiffanychenster/personal-blog
Confused as to why it works locally but not on Github pages. Thought it might be an error with my nav links but messed around with header.html a lot and got nowhere. Any help with creating the tag page on remote server would be much appreciated
GitHub Pages only allows you to run a number of whitelisted plugins, and jekyll-tagging is not one of them. This means the plugin won't run, the tag pages won't exist and you'll get a 404 response.
The suggested workaround if you want to continue using GitHub Pages and custom plugins is to build the site locally and commit the output. You could commit it to the same repo in a subfolder and then select that folder as your base in GitHub. Alternatively, you could keep the result in a separate repo (i.e. my-website and my-website-output). This way the source git history isn't tied to your output - as well as keeping each repo's file size down.
Another way altogether would be to create the tag pages without the plugin. It would be a bit more manual but not always unmaintainable depending on your use case.
Check out the ruby gem update_tags, which does what you're looking for and works in GitHub pages.
Here's some more context about how and why that gem works.

React app showing blank page in GitHub pages

After uploading my react app on gitHub pages its showing a blank page, and there is no error displaying in console. When I inspected the pages it says:
You need to enable javascript to run this page
but when I checked by browser settings it shows my javascript is enabled.
Here is my console
Here are the elements
Here is the Package.json
Also when I tested with a basic react app(no routes only single page) it was displaying properly
If gitHub is not publishing, is there any other alternative to publish my work?
Thanks
It looks good from my side. You should try with another browser to see if the problem persists.

Default Pages in DNN wont load as I deleted the 404 Error page

I was trying to solve a problem by deleting a 404 Error page in DNN (Recycle Bin was also cleaned) so that I can create a completely new page.
When I try to go back to Site Settings > Site Behavior > Default Pages, it fails to load and gives a wrong Internet Connection message which is caused by DNN not finding the default 404 Error page anymore.
UPDATE
I did try to RUN the following to set the 404 Error Page to a default value, but it still seems broken.
Update [dbo].[PortalLocalization] set Custom404TabID = NULL
I get the following error in the Console when trying to load Default Pages. It says the portal ID is undefined, but I checked and it is defined in PortalLocalization.
HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request.
(XHR)GET - https://www.ourwebsite.co.za/API/PersonaBar/SiteSettings/GetDefaultPagesSettings?portalId=undefined&cultureCode=en-US

ReactJS with react-router Browser History issue

I have a reactjs website, that uses react-router with browserHistory.
Today I found an issue and I have no clue how to solve this.
The problem is, when my website is opened inside an iframe, for example in google translate page. Navigation in my website no longer works everytime a link is clicked it gives me this error:
Uncaught DOMException: Failed to execute 'pushState' on 'History': A history state object with URL 'https://www.mywebsite.com/page' cannot be created in a document with origin 'https://translate.googleusercontent.com' and URL 'https://translate.googleusercontent.com/translate_c?depth=2&hl=fr&prev=sear….com&sl=en&u=https://www.mywebsite.com/&usg=ALkJrhiWY47c812s4y3W0cS1VDZX0xRNqA'.
Does anyone knows how can I 'fix' this?
Btw, I've tested this using the latest version of Chrome, and Firefox (both on Windows)
Thanks
This is a security design. You cannot push history state cross-domain.
Mozilla documents this limitation pretty well here:
https://developer.mozilla.org/en-US/docs/Web/API/History_API

Resources