Skip to content

Change default API URL to internal docker network.#1249

Closed
scragly wants to merge 1 commit into
masterfrom
internal-dns-api
Closed

Change default API URL to internal docker network.#1249
scragly wants to merge 1 commit into
masterfrom
internal-dns-api

Conversation

@scragly
Copy link
Copy Markdown
Contributor

@scragly scragly commented Oct 19, 2020

Currently, we're experiencing some issues requesting API data via the public domain, likely caused by some Cloudflare weirdness.

This change sets the internal domain api.site, referenceable through the internal Docker DNS only, as the default API domain in config.

This should be not merged until python-discord/site#413 and https://github.com/python-discord/salt/pull/21 are both merged and tested manually to resolve correctly.

@scragly scragly requested review from jb3 and lemonsaurus October 19, 2020 12:37
@scragly scragly requested a review from a team as a code owner October 19, 2020 12:37
@ghost ghost added the needs 2 approvals label Oct 19, 2020
Copy link
Copy Markdown

@fadedmax fadedmax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MarkKoz MarkKoz added a: API Related to or causes API changes a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) t: feature New feature or request labels Oct 26, 2020
@ghost ghost removed the needs 1 approval label Oct 26, 2020
Comment thread bot/api.py
@staticmethod
def _url_for(endpoint: str) -> str:
return f"{URLs.site_schema}{URLs.site_api}/{quote_url(endpoint)}"
return urlparse(f"{URLs.site_api}/{quote_url(endpoint)}", "http").geturl()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this results in three forward slashes but at least browsers don't seem to care...

@jb3
Copy link
Copy Markdown
Member

jb3 commented Oct 31, 2020

All our connection issues appear to have halted (win! 🎉) so I'm not sure we need this imminently.

We can revisit internal connections after the Kubernetes migration.

@jb3 jb3 closed this Oct 31, 2020
@ChrisLovering ChrisLovering deleted the internal-dns-api branch August 16, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: API Related to or causes API changes a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) t: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants