Replies: 3 comments
-
Looks like these are probably used with the The Unit approach is likely to be something like this route action: {
"share": "/var/www$uri",
"response_headers": {
"Content-Disposition": "`${args.disposition == 'inline' ? 'inline' : 'attachment'}; filename=\"${args.attachment_name === undefined ? 'offer.pdf' : args.attachment_name}\"`"
}
} It might be cleaner moved into a JS function that prepares the header. That would provide the same decoupling of logic and config that you get with the
|
Beta Was this translation helpful? Give feedback.
0 replies
-
yes of course
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Then my first guess was pretty good :) {
"match": {
"uri": "/runtime/offer*"
},
"action": {
"share": "/mnt$uri",
"response_headers": {
"Cache-Control": "no-store, no-cache, must-revalidate, max-age=0",
"Content-Disposition": "`${args.disposition == 'inline' ? 'inline' : 'attachment'}; filename=\"${args.attachment_name === undefined ? 'offer.pdf' : args.attachment_name}\"`"
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hot it will look like in nginx unit conf?
Beta Was this translation helpful? Give feedback.
All reactions