Skip to content
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

[ENHANCEMENTS] Allow for custom Whitelist/Blacklist result #38

Closed
fyr77 opened this issue Aug 2, 2023 · 1 comment · Fixed by #66
Closed

[ENHANCEMENTS] Allow for custom Whitelist/Blacklist result #38

fyr77 opened this issue Aug 2, 2023 · 1 comment · Fixed by #66
Labels
enhancement New feature or request

Comments

@fyr77
Copy link

fyr77 commented Aug 2, 2023

Is your feature request related to a problem? Please describe.
Currently, when using the whitelist or blacklist, HTTP status 403 is returned to anyone blocked.

Describe the solution you'd like
It would be nice to be able to return something different (such as a "sorry not available in your country") or redirect to another page or even a custom html page.

Describe alternatives you've considered

  • Not use the blocklist: not an option for my use case
  • Use another software such as caddy, which has this feature but no nice GUI like zoraxy.
@fyr77 fyr77 added the enhancement New feature or request label Aug 2, 2023
@tobychui
Copy link
Owner

@fyr77 Actually I do have a template for the black / white list 403 respond body, which looks like this.
圖片

But I forgotten to include it into the go:embed. So that is why it falls back to a blank page with 403 HTTP Error.
I am working on it with the static web server function for customizable, I guess it will still take me a month or more to make it working (as I only work on this project in my free time).

In the mean time, you can modify this line in main.go and set this to true

development = false //Set this to false to use embedded web fs

and then modify the template (/web/forbidden.html) in the web folder for a temporary solution.

@tobychui tobychui mentioned this issue Sep 25, 2023
@tobychui tobychui linked a pull request Sep 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants