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

Custom URL link directs to del.dog domain instead of host. #11

Closed
codywarmbo opened this issue Feb 16, 2020 · 9 comments
Closed

Custom URL link directs to del.dog domain instead of host. #11

codywarmbo opened this issue Feb 16, 2020 · 9 comments

Comments

@codywarmbo
Copy link

image
Once a paste is made with a custom URL, the link to that URL at the top of the page redirects to the del.dog domain instead of the local IP or whatever domain is being used.

@SuperSandro2000
Copy link
Contributor

I am not 100% sure but I think the https://del.dog in this needs to be dropped.

@codywarmbo
Copy link
Author

Thanks, if I'm using the docker, do you know how I can access that file to change it?

@SuperSandro2000
Copy link
Contributor

This file is compiled into the jar. You need to change it and recompile the jar/docker image.

@codywarmbo
Copy link
Author

Seems a little more complex than I hoped! Any tips where to look/start for accomplishing that?

@SuperSandro2000
Copy link
Contributor

I will do a PR in a few minutes and then it will be in the next version.
It was also a bit more complicated than I thought.
If you can't wait then you would need to do:

  1. Clone my fork and checkout the branch of the PR
  2. Build the dogbin image with docker build . -t dogbin/dogbin
  3. run docker-compose

Also there is https://github.com/dogbin/dogbin/blob/master/app/resources/templates/includes/base.peb#L39 left which I don't currently know how to fix. Maybe @deletescape can do that?

The PR is #13

@codywarmbo
Copy link
Author

That is fantastic. I can be patient. Thanks so much!

@nyancrimew
Copy link
Member

The remaining instances of the del.dog domain in Templates should be fixable by getting the host via the config which is already wired into the template logic

@SuperSandro2000
Copy link
Contributor

I must admit I have no idea how to do this.

@pavog
Copy link

pavog commented Mar 17, 2020

@SuperSandro2000

I think index.peb contains a good example for this.

To sum it up:
Use {# @pebvariable name="appConfig" type="dog.del.app.config.AppConfig" #} at the beginning of each template file that contains the host (statically) to setup the appConfig and use appConfig.host in all the places where you want to replace the del.dog domain.

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 a pull request may close this issue.

4 participants