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

docs: update example in serverless Plugin documentation #8980

Open
pottekkat opened this issue Mar 1, 2023 · 2 comments
Open

docs: update example in serverless Plugin documentation #8980

pottekkat opened this issue Mar 1, 2023 · 2 comments
Labels
doc Documentation things good first issue Good for newcomers

Comments

@pottekkat
Copy link
Contributor

Current State

The current documentation of the serverless Plugin shows a simple example of a log function:

return function() ngx.log(ngx.ERR, \"serverless pre function\"); end 

Desired State

This could be updated with a non-trivial example that could show the capabilities of the Plugin better:

        "serverless-pre-function": {
            "phase": "rewrite",
            "functions" : [
                "return function(conf, ctx)
                    local core = require(\"apisix.core\")
                    if not ngx.var.arg_name then
                        local uri_args = core.request.get_uri_args(ctx)
                        uri_args.name = \"world\"
                        ngx.req.set_uri_args(uri_args)
                    end
                end"
            ]
        }
@pottekkat pottekkat added the doc Documentation things label Mar 1, 2023
@Neilblaze
Copy link
Contributor

Neilblaze commented Mar 1, 2023

@navendu-pottekkat please assign this to me.

Copy link

This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 15, 2024
@pottekkat pottekkat added good first issue Good for newcomers and removed stale labels Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation things good first issue Good for newcomers
Projects
None yet
2 participants