question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Endpoints /.well-known/* are not included

See original GitHub issue

Describe the bug

We are hosting some endpoints under the /.well-known/ path prefix, this prefix is quite standard and enforced by Android et iOS domain checks. During the “adapt” phase, endpoint files are not copied by the builder writeServer() funnction. Paths starting with a dot are explicitly filtered out.

Reproduction

I created a reproduction app there https://github.com/trecloux/svelte-kit-dot-path-filtered-out

Logs

No response

System Info

System:
    OS: Linux 5.16 Arch Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 373.44 MB / 31.20 GB
    Container: Yes
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.2.0 - ~/.nvm/versions/node/v17.2.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v17.2.0/bin/yarn
    npm: 8.1.4 - ~/.nvm/versions/node/v17.2.0/bin/npm
  Browsers:
    Chromium: 97.0.4692.71
    Firefox: 96.0
  npmPackages:
    @sveltejs/adapter-node: next => 1.0.0-next.61
    @sveltejs/kit: next => 1.0.0-next.229
    svelte: ^3.44.0 => 3.46.1

Severity

blocking an upgrade

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
treclouxcommented, Jan 14, 2022

Serve .well-known/file from static folder. I am using the same in production in a project

Unfortunately, I’m using dynamic content there

2reactions
mankinscommented, Apr 19, 2022

I think adapters should respect config.kit.routes and/or include .well-known as an exception.

I agree. I think the blanket filter is a bug, but besides @sidvishnoi 's workaround you can work around it this way as well:

Rename .well-known to [...wellKnown=wellKnown]

src/routes/.well-known => src/routes/[...wellKnown=wellKnown]/

and then: src/params/wellKnown.ts is

import type { ParamMatcher } from '@sveltejs/kit';

export const match: ParamMatcher = (param) => {
  const isWellKnownPath = /^\.well-known$/i.test(param);
  return isWellKnownPath;
};

That way the file doesn’t start with a . and isn’t filtered by the adapter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
When attempting to use Frappe as an IdP, there seems to be no access to /.well-known/openid-configuration or similar. This endpoint provides ...
Read more >
Get OpenID Connect Well-Known Configuration
Returns the OpenID Connect configuration values from the provider's Well-Known Configuration Endpoint, per the specification (http://openid.net/specs/openid- ...
Read more >
Endpoints | ZITADEL Docs
Typically the required openid value is missing. unauthorized_client, The client is not authorized to request an access_token using this method.
Read more >
Authentication - Okta Support
Hey people, We got a small problem which I could not solve with the ... I would like to change the returned endpoints...
Read more >
openId Connect EndPoints Missing on ADFS - TechNet
End Point of openID connect on ADFS. https://<ADFSname>/adfs/.well-known/openid-configuration https://<adfsname>/adfs/discovery/keys.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found