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

[Feature]: options for add files in /oauth2/static/ #2614

Open
devildant opened this issue Apr 22, 2024 · 4 comments
Open

[Feature]: options for add files in /oauth2/static/ #2614

devildant opened this issue Apr 22, 2024 · 4 comments

Comments

@devildant
Copy link

Motivation

My goal is to be able to put images, and files like a manifest file for webapps, in the static directory of oauth2-proxy (/oauth2/static/)
and use this in the login page (override)
<link rel="manifest" href="/oauth2/static/custom/manifest.webmanifest" />

for implementation, mount a volume directory in docker, and indicate via config the path to use as for page override (--custom-templates-dir)
the options could have the following name
--custom-statics-dir

Possible solution

No response

Provider

None

@tuunit
Copy link
Member

tuunit commented Apr 22, 2024

We had similar requests in the past. This to me sounes like feature creep and we most likely aren't going to support this. Use existing solutions dedicated for providing static files like nginx and setup proper routing for your files.

@JoelSpeed any other opinion on this?

@tuunit
Copy link
Member

tuunit commented Apr 22, 2024

Furthermore, don't we already have an option that serves static html files anyway?

--custom-templates-dir string path to custom html templates?

anything further than that like images, css and etc. should be provided from somewhere else

@devildant
Copy link
Author

devildant commented Apr 22, 2024

We had similar requests in the past. This to me sounes like feature creep and we most likely aren't going to support this. Use existing solutions dedicated for providing static files like nginx and setup proper routing for your files.

@JoelSpeed any other opinion on this?

for me it would be a gas factory, having to put an nginx server on the front end.
I use a reverse proxy on Synology but impossible to write the conf.
therefore this would amount to putting an nginx container in front of oauth2-proxy just for images and a manifest file.
Hence my feature request :p

it would just be a matter of being able to bind a volume, and its contents appear in a directory /oauth2/static/custom for example

Furthermore, don't we already have an option that serves static html files anyway?

--custom-templates-dir string path to custom html templates?

anything further than that like images, css and etc. should be provided from somewhere else

yes i use it (--custom-templates-dir) to customize the login and error page and it works well, but unfortunately I cannot define manifest or images for certain meta tag which requires a file on the server (base64 does not work)

I tried to put my images and manifest files in the directory (custom-templates-dir), but I can't find a route to access them

@devildant
Copy link
Author

with the customization of templates it seems logical to me to be able to define static files :)

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

No branches or pull requests

2 participants