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

something in each request with CDN #1509

Open
Saeeed-B opened this issue Feb 7, 2024 · 2 comments
Open

something in each request with CDN #1509

Saeeed-B opened this issue Feb 7, 2024 · 2 comments

Comments

@Saeeed-B
Copy link

Saeeed-B commented Feb 7, 2024

Hi, considering that CDN does not send the request to the server,
If I want to do something in each request, for example, to save a series of statistics in the database or to check the request header, what should I do?

@erankor
Copy link
Contributor

erankor commented Feb 17, 2024

It depends on what you want to do... e.g. a simple header check can be implemented using the nginx if directive, or nginx auth_request.
If you need something more complex, you can use nginx-lua to write custom Lua code in various phases of the request (e.g. access_by_lua_block)

@Saeeed-B
Copy link
Author

Saeeed-B commented Feb 17, 2024

Well, the point is that cdn does not transfer the request to our vod server in every req . And response himself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants