Skip to content

Commit

Permalink
Merge branch 'main' of github.com:unity-sds/unity-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
buggtb committed Feb 28, 2024
2 parents e1855ce + 41c7084 commit 8850b1b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@ Unity Reverse Proxy

How to trigger:
```
resource "aws_lambda_invocation" "example_invocation2" {
function_name = module.unity-proxy-CgbrD.lambda_function_name
variable "template" {
default = <<EOT
<VirtualHost *:8080>
RewriteEngine on
ProxyPass /sample http://test-demo-alb-616613476.us-west-2.elb.amazonaws.com:8888/sample/hello.jsp
ProxyPassReverse /sample http://test-demo-alb-616613476.us-west-2.elb.amazonaws.com:8888/sample/hello.jsp
</VirtualHost>
EOT
}
resource "aws_lambda_invocation" "demoinvocation2" {
function_name = "ZwUycV-unity-proxy-httpdproxymanagement"
input = jsonencode({
filename = "example_filename1",
template = "<VirtualHost *:8080>\nRewriteEngine on \n ProxyPass /management/ http://<DNS_NAME>/\n ProxyPassReverse /management/ http://<DNS_NAME>/ \n ProxyPreserveHost On \n RewriteCond {HTTP:Upgrade} websocket [NC] \n RewriteCond {HTTP:Connection} upgrade [NC] \n RewriteRule /management/(.*) ws://<DNS_NAME>/$1 [P,L] \n FallbackResource /management/index.html \n </VirtualHost>"
template = var.template
})
# Depends on ensures that the Lambda function is created before it is invoked.
depends_on = [module.unity-proxy-CgbrD]
}
```

0 comments on commit 8850b1b

Please sign in to comment.