-
Notifications
You must be signed in to change notification settings - Fork 22
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
Option to disable file browsing #417
Comments
Hey @ratulb! Yes you are right, we need a way to run the server without serving the FileExplorer. Perhaps to keep backwards compatibilty we could have a Let me know your thoughts! And if you are willing toxgive it a shot! |
Thanks for your prompt response. I would like to give it a shot very much.
It would be helpful if you could spare some time pointing me in the right direction where changes would be needed.
…________________________________
From: Esteban Borai ***@***.***>
Sent: Sunday, February 18, 2024 11:51 PM
To: http-server-rs/http-server ***@***.***>
Cc: Ratul ***@***.***>; Mention ***@***.***>
Subject: Re: [http-server-rs/http-server] Option to disable file browsing (Issue #417)
Hey @ratulb<https://github.com/ratulb>!
Yes you are right, we need a way to run the server without serving the FileExplorer.
Perhaps to keep backwards compatibilty we could have a --no-explorer?
Let me know your thoughts! And if you are willing toxgive it a shot!
—
Reply to this email directly, view it on GitHub<#417 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM3HO3YCFNQLJKCZFZNPLTYUJBBDAVCNFSM6AAAAABDOHP6X6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGQYDKOBSHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I already made a pull request for this exact feature here: #374 . I called the flag P.S. Please follow up on the testing framework discussion |
I'd go one step further and make that the default. This isn't a library, so it wouldn't be a "breaking" change, and I'd argue that much more people would use this app for html sites than as an explorer in the browser. In other words, I wouldn't be concerned about backwards compatibility |
--no-explorer sounds explicit in it's intent without breaking any existing setups. |
I don't think it's necessary for this feature to disable the explorer. Automatically loading |
Agree! Its always a good practice to maintain backwards compatibility. |
I meant if explicitly not enabled - explorer behaviour should not be available. command: http-server #server started with explorer feature disabled command: http-server --explorer #server started with explorer feature enabled localhost:7878 -> Show index.html - if present else explorer Would like to hear more from you guys. |
Why not just leave it in if the path is an existing directory without an |
Tied up with a GA release. Would need to come back.
@Antosser<https://github.com/Antosser>?
…________________________________
From: Esteban Borai ***@***.***>
Sent: Saturday, February 24, 2024 9:49 AM
To: http-server-rs/http-server ***@***.***>
Cc: Ratul ***@***.***>; Mention ***@***.***>
Subject: Re: [http-server-rs/http-server] Option to disable file browsing (Issue #417)
Hi @ratulb<https://github.com/ratulb> and @Antosser<https://github.com/Antosser>!
I think we have a valuable discussion here, what do you guys think about working together on polishing this feature in @Antosser<https://github.com/Antosser> PR #374<#374> via code review?
—
Reply to this email directly, view it on GitHub<#417 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM3HOYQTLQAJPHMESNRYQLYVFS3JAVCNFSM6AAAAABDOHP6X6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGI2DOMJRG4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Is this issue now resolved? |
Description
Could not find anywhere an option to open the index.html page when user opens localhost:7878. How do we do that?
Most of the cases - when we access the server with localhost:7878, we expect to see the home page - not the file system. Of course - file browsing is useful but it should be configurable.
Is there a configuration? Documentation says - by default it is enabled. Did not see an option to disable.
The text was updated successfully, but these errors were encountered: