Comments (6)
Finally I was able to try it.
The default http error 404
for unknown/not existing domains works as expected.
Also I'm sorry for not answering. I was really happy when I saw your comments but haven't had enough time to test it and give feedback, also didn't want to just write something like "cool, testing it soon..."
from error-pages.
Version 2.3.0 has been published! Everything should be fine after the update :) Feel free to close this issue after checking on your side.
from error-pages.
@DanielRamp ping :)
from error-pages.
Did I understand you correctly, you want always http response code 200 even if these are error pages?
Because this new behaviour is not what I see as "normal" from big websites (1, 2) and also breaks for example a statuspage.
In previous versions of error-pages a statuspage could just request the page every minute or so and if the response http code is 200 it's "healthy/up".
Or is there something I have to set in my reverse proxy (traefik) configuration to get this desired result back?
from error-pages.
$ docker run --rm -d -p "8080:8080/tcp" tarampampam/error-pages
$ curl -v http://127.0.0.1:8080/foobar
* Trying 127.0.0.1:8080...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /foobar HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Date: Wed, 29 Dec 2021 10:13:57 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 80
<
* Connection #0 to host 127.0.0.1 left intact
Wrong request URL. Error pages are available at the following URLs: /{code}.html
$ curl -v http://127.0.0.1:8080/500.html
* Trying 127.0.0.1:8080...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /500.html HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 29 Dec 2021 10:14:46 GMT
< Content-Type: text/html; charset=utf-8
...
For the non-existing page status code is 404, for the error page with code 500 - the response code is 200. Should we change something? I think - no :)
from error-pages.
Oh, sorry, you're right... For the non-existing domains response code should be not 200. I have made a flag --default-error-page
, but forgot about the response code customization. I will make a fix shortly, thanks for your issue!
from error-pages.
Related Issues (20)
- GDPR - Replace Google Fonts by Bunny Fonts HOT 1
- The DockerHub has the wrong project description HOT 1
- Can we add the possibility of inline translation using Accept-Language header?
- Turn off logs HOT 6
- Custom env variables to be used in templates HOT 3
- Healthcheck fails after update to 2.20.0 HOT 11
- CPU spikes HOT 6
- Not found returns 405 if methods are POST/DELETE etc.. HOT 7
- Redirect missing requests to default status page HOT 5
- Support IPv6 HOT 5
- HTTP status code not set per code template HOT 3
- Custom static-pages ( no error pages, but default-backend related )
- Add "Retry-After" header support
- Custom 404 page
- IP Restricted additional information
- "Too big request header" HOT 7
- cross origin request to fonts.bunny.net fails HOT 2
- X-Transmission-Session-id Header Stripped HOT 12
- Forced language setting via variable HOT 11
- Use numeric user id to be compatible with Kubernetes Pod Security Policies HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from error-pages.