ChatGPTAPIFree icon indicating copy to clipboard operation
ChatGPTAPIFree copied to clipboard

Google Cloud Armor Rules

Open argidenise opened this issue 1 year ago • 3 comments

Hi Ayaka,

I want to self-host my own API endpoint, please kindly share what Google Cloud Armor rules did you use?

Thank you.

argidenise avatar Mar 14 '23 12:03 argidenise

Note that the second and the third rules are not safe at all, because simply changing the "User-Agent" header will bypass them. However, the rules are set to show that developers should use this API appropriately and should not use programming methods to call this API on a large scale. Otherwise the free API will be exhausted very quickly.

ayaka14732 avatar Mar 14 '23 15:03 ayaka14732

Thank you! I have successfully created the rules, may I know how to connect this to my Cloud Run? I have been trying :(

argidenise avatar Mar 14 '23 15:03 argidenise

Yes, I also think the setup is confusing :(

  1. In Load balancing, create a load balancer.

  1. In Cloud Armor - "Apply policy to targets", apply to the load balancer we've just created.

If you are willing to contribute, feel free to create a PR with the steps for the configuration!

ayaka14732 avatar Mar 14 '23 16:03 ayaka14732