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

Remove port from Minio upload URL #1094

Open
Thor77 opened this issue Dec 10, 2018 · 2 comments
Open

Remove port from Minio upload URL #1094

Thor77 opened this issue Dec 10, 2018 · 2 comments
Labels
enhancement Wants to improvide an existing feature

Comments

@Thor77
Copy link
Contributor

Thor77 commented Dec 10, 2018

I'm running Minio behing Traefik (with HTTPs enabled), therefore I specified 443 as CMD_MINIO_PORT.
When uploading an image

![](https://myminio.backend:443/mybucket/uploads/upload_<id>.jpg)

is inserted into the editor.
Is there an option to remove the port here, so that

![](https://myminio.backend/mybucket/uploads/upload_<id>.jpg)

is inserted instead?

@SISheogorath SISheogorath added the enhancement Wants to improvide an existing feature label Dec 10, 2018
@SISheogorath
Copy link
Contributor

Not right now. I'm quite sure this is based on the fact that we pass the port to minio.

const minioClient = new Minio.Client({
endPoint: config.minio.endPoint,
port: config.minio.port,
secure: config.minio.secure,
accessKey: config.minio.accessKey,
secretKey: config.minio.secretKey
})

Which has a default in our configs:

minio: {
accessKey: undefined,
secretKey: undefined,
endPoint: undefined,
secure: true,
port: 9000
},

Feel free to contribute a solution, it's maybe done by writing some checks and move them to https://github.com/hackmdio/codimd/blob/master/lib/config/index.js so we can make sure we use the right default ports here.

@Thor77
Copy link
Contributor Author

Thor77 commented Dec 10, 2018

I'll take a look at implementing it, thanks for your answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Wants to improvide an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants