Skip to content

Nginx whitelist and clouflareProxy - #211

Merged
Andrei Kvapil (kvaps) merged 5 commits into
cozystack:mainfrom
mrkhachaturov:nginx-whitelist
Jul 22, 2024
Merged

Andrei Kvapil (kvaps) merged 5 commits into
cozystack:mainfrom
mrkhachaturov:nginx-whitelist

Conversation

@mrkhachaturov

Copy link
Copy Markdown
Contributor

Please check Makefile.

I can`t generate new readme.md

@mrkhachaturov

Copy link
Copy Markdown
Contributor Author

@kvaps Andrei Kvapil (kvaps) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Mr. Khachaturov (@mrkhachaturov) thank you for your contribution! Could you please specify values in values.yaml file

Also, I'd like to change the naming for the options to be more generic, eg:

## @param whitelist List of client networks
## Example:
## whitelist:
## - "1.2.3.4"
## - "10.100.0.0/16"

whitelist: []

## @param realIPProvider Enable configuration for specific RealIP provider. Allowed values: `none` and `cloudflare`
realIPProvider : "none"

@kvaps

Copy link
Copy Markdown
Member

As about generiting values schema, it can be done using bitnamis readme-generator-for-helm

You can check the example here:
https://github.com/aenix-io/cozystack/blob/bbd2ca81a376d0ddc32a9f7264f7cdb53dc36b89/packages/apps/tcp-balancer/Makefile#L2-L3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, it is an interesting functionality, but it would be good to describe it in a readme.

Comment thread packages/extra/ingress/Makefile Outdated
@@ -1,2 +1,12 @@
get-cloudflare-ips:
curl -s https://www.cloudflare.com/ips-v4/# | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}' > ips-v4.tmp

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend adding a timeout, for example 2-4 seconds, so as not to wait 30 or more seconds if this resource is unavailable for one reason or another.

@kvaps Andrei Kvapil (kvaps) changed the title Nginx whitelist Nginx whitelist and clouflareProxy Jul 22, 2024

@kvaps Andrei Kvapil (kvaps) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fixed it a bit. LGTM

Signed-off-by: Andrei Kvapil <[email protected]>
@kvaps
Andrei Kvapil (kvaps) merged commit 8319a00 into cozystack:main Jul 22, 2024
@mrkhachaturov
Mr. Khachaturov (mrkhachaturov) deleted the nginx-whitelist branch July 22, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants