-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors: use application errors from CF and ALBs #469
Comments
Is this a feature that AWS and/or Cloudflare provide? I'm not aware of it. |
Cloudflare, definitely: https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-custom-pages/configuring-custom-pages-error-and-challenge/ AWS I think usually would require Cloudfront in front of the ALB, so this might not require any changes at AWS -- Cloudflare is serving the same purpose as Cloudfront. |
@humitos I won't put this on this sprint, but this might be a good issue for you if you are looking for additional tasks. |
I will put on the spint as Low priority. Otherwise, I will miss it completely 😄 . If I have extra time I will take a look, otherwise, we will push it to the next sprint or moving to the backlog in the next meeting. |
These are all the custom pages that CF supports:
What are the ones we are interested here? I suppose "500 class errors" for now and maybe 429 errors. cc @agjohnson The required work here is:
|
I tried using this file for 5xx, but Cloudflare says it's too big 😢 -- we may need to use inline CSS only with the required rules and a smaller SVG, probably.
https://readthedocs-static-ext-theme-prod.s3.us-east-2.amazonaws.com/5xx-cloudflare.html |
👍 That's what I was thinking, we can add more later if we want but I'm also happy to have the challenge and block pages maintained by Cloudflare.
This is unfortunate. Their docs are a bit quiet about this except for:
I would not go deeper on this, unless there is a really easy answer here. There is a fair amount of work in creating minimal CSS that matches the look and feel of the existing pages. We can come back to this issue, I assumed it was going to be much simpler. We should not use inline CSS anymore, this would require a separate CSS file generated through webpack with trimmed down rules and this would be a good amount of work to replicate the look/feel on desktop/tablet/mobile and keep the two in sync.
Is there a good reason to not serve this from the application? We already have a serving mechanism in debug mode ( |
I didn't find an easy answer here and I thought it could not be easy to do it with semantic-ui to extract only the CSS we need. I won't continue working on this issue for now since it's kind of a "nice to have" at the moment.
I'm not sure how CF works here. Does it downloads and cache the HTML once and then serve it from its own servers? Otherwise, if it hits our application when the application is down to serve the 500 template, it won't work 😄 |
👍 I'll dig into this again later, there might be a workaround or hack that satisfies all of this (load styles dynamically via a small JS include for example).
Yup, it looks to be stored/cached: |
Just noting here before I forget, I'd like to make sure our 5xx error pages are used from our various services, and likely need to configure bold CF and ALBs to use these error pages, or copy and hardcode these pages in the services.
We shouldn't show nginx or the default ALB error pages with nicer error pages.
The text was updated successfully, but these errors were encountered: