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

fix: Check HTTPS_ENABLED env var before HTTPS redirection #7

Merged
merged 13 commits into from
Jan 11, 2025

Conversation

Rohanlogs
Copy link
Contributor

@Rohanlogs Rohanlogs commented Jan 9, 2025

Description

  • Uses HTTPS_ENABLED environment var for HTTPS redirection

  • Adds world config loader for docker

  • Users can now configure worlds directly from server repo, when running prod build

  • Environment variable is now passed to all 23 routes which use the header.ejs:

ᴄʟɪᴄᴋ ғᴏʀ ᴅᴇᴛᴀɪʟs
whychoosers.ejs
title.ejs
terms.ejs
serverlist.ejs
privacy.ejs
player\adventurelog.ejs
news\post.ejs
news\index.ejs
mod\session.ejs
news\create.ejs
index.ejs
downloads.ejs
create\username.ejs
disclaimer.ejs
detail.ejs
create\terms.ejs
create\password.ejs
create\finish.ejs
cookies.ejs
about\whatisrs.ejs
about\virtual.ejs
about\index.ejs
about\getstart.ejs

Why

For production build to work, these changes need to be made in the Website repository, as docker is pulling it from Server, see #1074

@Rohanlogs Rohanlogs marked this pull request as draft January 9, 2025 17:28
@Rohanlogs

This comment was marked as resolved.

view/_partial/header.ejs Outdated Show resolved Hide resolved
@Rohanlogs Rohanlogs requested a review from Pazaz January 10, 2025 13:53
@Rohanlogs
Copy link
Contributor Author

I added an extra file https://github.com/2004Scape/Website/pull/7/files#diff-51f6929abdfb9361c8f1466cd14634dbb7f67c2a8eb5de79aa8ff9e61c46df5a

This doesn't change anything with how worlds work, its only to make docker production build easier (I'll add clear instructions for this in #1074)

@Pazaz
Copy link
Contributor

Pazaz commented Jan 11, 2025

Looks good. Note: world config will be moved to the database in one of the next feature updates so this may need to be touched on again then.

@Pazaz Pazaz merged commit 42ebc61 into 2004Scape:main Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants