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

AEWeb - Directory listing #705

Merged

Conversation

bchamagne
Copy link
Member

@bchamagne bchamagne commented Nov 21, 2022

Description

Display a directory listing when the user hits an endpoint that correspond to a directory and the directory does not contain a index.html file.
This should be performant because only 1 transaction is downloaded (the reference transaction). But, because of this we cannot determine the files' sizes.

I used Firefox source as template.

Fixes #596

Type of change

  • New feature

How Has This Been Tested?

Tested with unit tests.
Tested with the aewebcli with the following structure myaewebdir.zip

Screenshot 2022-11-30 at 14-31-20 Index of _

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@samuelmanzanera samuelmanzanera added the feature New feature request label Nov 21, 2022
@bchamagne
Copy link
Member Author

Please note there is a new config variable that should have different value in MainNet et TestNet

@samuelmanzanera samuelmanzanera added the core team Assigned to the core team label Nov 28, 2022
config/prod.exs Outdated Show resolved Hide resolved
@bchamagne
Copy link
Member Author

I suggest to review commits 1 by 1 since @Neylix comments. (last one looks huge but it's just moving code around)

@samuelmanzanera samuelmanzanera merged commit 8f79ce9 into archethic-foundation:develop Nov 30, 2022
tenmoves pushed a commit to tenmoves/archethic-node that referenced this pull request Dec 6, 2022
…tion#705)

* AEWeb directory listing if there is no index.html
* Put explorer_url in config because we need to link to it from other domains in AEWeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core team Assigned to the core team feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Listing directory for web hosting deployment without index.html
3 participants